Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Which PHP version is that? Everything 3v4l runs gets it right... https://3v4l.org/LbXr0
-
7.3
Im confused as fuck.
Seriously. Im still scratching my head about this -_-
Edit:
On eval its allright too. On other machine with pinpoint same version its fine too....
Whaaaaat the hell ;-; -
@watzon
Given it few years. I still like it. And even, I like it more and more.
PHP hate is reserved for people who didn't give it enough time or attention. But that's my opinion, I elaborated on it so many times its getting boring. -
watzon45875y@DubbaThony I've worked with it for years and can't stand it. I've generally found that people who have worked pretty exclusively with PHP love it, but anyone that's worked with a more friendly language like Ruby can't stand PHP. I'm the latter.
-
@watzon
Before PHP I was from passion dealing with CPP and ansi C.
I really like all of these 3, but if Im to choose what to code in from these 3, all my money goes onto PHP (unless its windowed app, than cpp + QT).
So in theory I should hate php but I don't.
My friend, knowing that I like idea of low-level code tried to show me few "more friendly" languages, namely:
- Go lang
- Rust
- some weird java-based thing I dont remember name of, but it was weird as fu*k
(...)
And you know what? All of them were for me "what about no?" -
watzon45875y@DubbaThony it actually makes sense that you'd like PHP if you have C experience. PHP is basically just a high level wrapper around C.
-
C0D4669025y@watzon so what's my problem?
I've been a php for 10 years
I also work with Java and python but still run back to my sexy girl. -
C0D4669025y@DubbaThony as for your issue, this looks fine π€
Not on a pc/laptop at the moment so hard to debug in a phone π -
Non strict compression always have some issue like this. That's why you should aways make the strict true.
-
C0D4669025y@watzon I know, i just wear my weirdness with pride. People tend to think me be crazies π
-
@C0D4
I have no idea why its broken on my main machine, but on second machine it's fine, so I guess my php install is corrupt somehow.
I guess...
It will be mystery for me and probably for everyone out there. -
@C0D4 nope completly different enviroments.
One is windows machine, other is linux machine.
E:
but PHP version is same, and plugins same too. I will copy over php.ini to check.
E2:
php.ini copied over. Still works on second machine. -
C0D4669025y@DubbaThony there are some inconsistencies with windows and Linux for some functions, it's always been a thing and drives you insane.
I just hope you're not using x86 on windows and x64 on Linux or visa versus π -
@C0D4
nah, x86.. man, my machines arent that old ;)
anyway, I doubt THIS function has this kind of issues.
I avoid OS-dependant functions as much as possible heh. Im aware of them ;) -
C0D4669025y@DubbaThony π€I know arrays are one of those weird ones if you were working with floats/ints (key being larger then 32bit) but for string based keys it should be the same.
-
So is this freaking out because you’ve set it as false and it’s throwing true?
-
@C0D4 string-based keys are one of my favourite features of php ^^
Yeah, yeah, dictionaries etc.. But ability to use it as array, name it array and treat it as array is purefect :D
and no int-overflow issues.
Here, this array has few elements, it wouldnt overflow 8 bit int ;) -
C0D4669025y@DubbaThony I do enjoy $arr['whoot_i_is_key']
Nah, dicts are close but not as flexible in strict types languages π
I mean I can have a multi-dimensional, multi-type keys (map/dict) and ain't nothing wrong with that, besides confusing the next guy. -
C0D4669025y@badcopnodonuts it should be throwing true. First line
Makes sense that in strict mode it does the right thing (true as 3rd argument) on third line
But first and second lines are ultimately the same.
I'm thinking it's a windows thing π -
@C0D4
For example. very fresh for me, Im making something that allows render text on image. It's "virtual gift card" kind of thing.
and I have this array element:
$coords[0]["tlc"]["x"]
where 0 is just first string to put on the image, tlc is top left corner and x is well.. x from x/y
remixing array key types is purefect :) And how much more readable than $coords[0][0][0] for example :) -
C0D4669025y@DubbaThony god dam yea.
I hate having multi-dimensional arrays with just iterators for indexes, it's like - wtf am I even doing down here?
I have a bad habit of doing this kind of thing but I do come from the dark ages
$x[0]["name"] makes a lot more sense to where you are over [0][0] -
@C0D4 Sometimes these make sense, but often times you can make your structures SO MUCH MORE readable with simple ["cough-cough string indexes"] :)
-
@watzon i kinda see your point. But i have worked with many langs, from C# and Java to Python, Ruby, JS, TypeScript, and even Clojure(managed to use it at work) and still love php π€·βοΈ its a very "get shit done" lang.
Then again I don't dislike any langs. Even worked with VBScript at one point and liked it. -
watzon45875y@AleCx04 I'm very picky about syntax, speed, and other tradeoffs. I've used too many languages to mention, but I could definitely tell you the worst parts of all of them. PHP just happens to be super far down the list for me. I can't stand the syntax (it's basically just an HTML templating language) and it's not near as fast as most of the languages I use.
The only exception for me is Laravel. Somehow Jeffery managed to make PHP not suck with that framework. I don't know how he did it, but he's a miracle worker. -
@watzon i can't fault people for disliking syntax man haha its a preference thing. To me there are a couple of them that just have horrible syntax. Still, I recognize the value in what they bring to the table and still enjoy them for some reason. Mainly the money they bring to me.
I must say though, Laravel does not add any layer of abstraction into the syntax of PHP, merely architectural idioms, maybe what you don't dig is seeing people abuse PHP as a template language.
For me I really do enjoy the syntax. I am still trying to find a language that I would just completely abhor. Been programming for a while and still have not found one(VBScript should pretty much give you a good guesstimation of the time) -
@AleCx04
For me acceptable syntax is honestly just one, other syntaxes are plain annoing to horrible depending on example. C-derrived syntax is π
So java, even JS is bearable for this only purpose, etc.
Thats when we talk syntax. -
Hel8y3375yAs mentioned before by others, PHP is built on top of C. You can use this fact to explain the behavior of underlying implementation of in_array. Use gdb to start PHP and run the script. This has helped me in the past to resolve some issues in PHP.
There are some articles on the internet which explain how to, but it require at least some basic knowledge of C. -
Hel8y3375y@gronostaj Kind of insane indeed, but after a few hours of trial and error gdb was my last option for solving the bug :)
Related Rants
-
linuxxx32*client calls in* Me: good morning, how can I help you? Client: my ip is blocked, could you unblock it for m...
-
DRSDavidSoft28Found this in our codebase, apparently one of my co-workers had written this
-
Korvax31Italian chef: We have the best spaghetti in the world PHP developer: I doubt that
First time me ranting about PHP.
First time. I still really like the language.
But what the fuck.
I am debugging, I narrowed down bug to my validator.
I played with php console and debugger and narrowed down to that one offending line.
Narrowing down to smaller and smaller examples when it dosent work, confusion and tension grows in me.
And then it hit me.
Confusion got to apogeum.
Anyone, if you know the anwser, please tell me.
WHAT THE FUCK?
maybe thats task for stack overflow? Hrm...
No, I dont have time to explicitly tell what I tried to google and spend 4 hours to have all checkmarks ticked before asking lol
rant
wtf
debug
debugging
php