Hello everyone, my name is Kolya and I have been writing in php for 10 years. Clap-clap-clap, hello, Kolya.
For the first time I tried PHP in 11th grade, at that time sites for mobile phones were very popular, and I was drawn into it. I wrote in php during lessons and breaks from my nokia n73, dealt with one of the widely known CMS in narrow circles, and dreamed of a bright future. Here it is, I am now a programmer, I understand everything and I succeed.
Then there was the first job, the abandoned university, OOP, frameworks, and the first attempts to jump off. Java first, then pros. I made simple helper programs (time tracker with autosave in jira, ten-line plugins for IDE), and among these for, if, switch I swam like a fish in water without any problems. But as soon as something more complicated than a timer was required, the beatings immediately began keyboard, table and other handy items.
I sincerely did not understand why the hell the error looked like the third volume of War and Peace, with a bunch of incomprehensible text and a complete lack of a human - readable and understandable description of the error. There were a lot of such things, and my uncle demanded to close the pressing tasks, and I just threw the slightly begun learning of a new language on the back burner.
, , , SOLID, SQRS, DDD. PHP , xdebug, " ". , . Java Android, table view , . , ( ). java , PHP, parent - super, @override. , wtf??? , , , -, . .
Strict types php, , RFC . , java.
, swift, kotlin. , , , JavaScript.
Swiftbook : if, for, switch, class struct, enum, tuple( , php ?). -, symfony json API.
XCode entities, - json . . json php, symfony serializer, . , ,
{success: true, result: {SomeObjectOrArray}}
{success:false, errors: [listErrors]}
, , , result - . , , , , , swift. , , .
open func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath?, withSender sender: Any?) -> Bool {
guard let indexPath = indexPath else { return false }
return self.presenterForIndexPath(indexPath).canPerformMenuControllerAction(action)
}
, , - .
:
if let JSONObject = try JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [[String: Any]],
let username = (JSONObject[0]["user"] as? [String: Any])?["name"] as? String {
// There's our username
}
, , php- ( , , ).
- , - . , , , PHP . .
, ( JS, , ) - , , - . UIKit, -. , , ( SwiftUI, , ). , " , ".
, swift. , , " php ?"
- , , PHP. PHP . , , , . - Hello World, - ToDo list, - . , Middle/Senior , , " ". "" . , "" " ".
I love PHP, or rather the things that I can do with it. I love clean and understandable code, which is generally easy to write in this language. Once upon a time there was an article on Habré that good code looks beautiful, all these indents and brackets, laconic functions without a gram of excess. And PHP allows you to write such code. In my opinion, in its field (creating web applications), this language is great, and it should be just that (well, or almost ). But am I a good programmer after a decade of PHP development? Probably not.