« first day (3289 days earlier)      last day (1659 days later) » 

 
4 hours later…
4:06 AM
\o
 
4:28 AM
$variable = 'myfile.txt'; //this is dynamice filename

 $output = shell_exec('sshpass -e  sftp  -o ProxyCommand="corkscrew my.proxy.com proxyport %h %p" usernme@destination <<!
   cd mydir
   put path/to/myfile/$variable --> here I can't access it's emtpy
   bye
!');
anyone please
 
vars aren't interpolated in single quoted strings
 
5:02 AM
o/
 
@JoeWatkins you mean '$variable' but not working
 
5:17 AM
@jemz it means variable string interpolation works only in "$variable" and "${variable}"
 
I chane to $variable = "myfile.txt" ..then put path/to/myfile/"${variable}" its empty
change*
maybe shell_exec causes to emptynes my variable?
 
5:35 AM
I fixed now thank you
Thank you guyz you help me a lot 😭
 
5:59 AM
Hack is "a dominant web development language across large technology firms with over 100 million lines of production code." Who besides Facebook is still using Hack?
 
6:12 AM
I have started blogging php related blogs. If anyone have any suggestions please do the needful programmingdive.com
 
6:47 AM
I received a help from the discussion about switch expression on ML, the voluneter says has already implemented most of the RFC, I've cleaned RFC up and removed switch statement improvements and focus only on switch expression.
I think it could be up for discussion soon, haven't linked new RFC under in Draft cause I don't wanna @PHPRFCBot to tweet about it yet
:) Happy Friday
 
7:03 AM
@cmb Just've checked, no changes ( If I use FFI function definition without __vectorcall, then I receive "Failed resolving C function", if I put the __vectorcall attr in FFI definition, then I receive "unsupported calling convention"
@cmb Version php-7.4-nts-Win32-vc15-x64-ffi-vectorcall
 
Is MySQL Workbench the same as MySQL Query Browser?
 
cmb
7:21 AM
@lisachenko, thanks for checking! Sorry, I screwed up the build (didn't use the new libffi). I'll start new builds right away, and ping you once they're finished (takes a few hours).
 
@cmb ok, thank you!
 
I want to retrieve SRC in html img tag response I have a response like following

$variable = "MOMENTS FROM THE #FEELZAUSTRALIATOUR2019\r\n<img class=\"alignnone size-medium\" src=\"https://feelz.comf-300x200.jpg\" > <img class=\"alignnone size-medium\" src=\"https://feelz.com3-300x200.jpg\" /> <img class=\"alignnone size-medium\" src=\"https://feelz.com/300x200.jpg\"/>";

I have used following code for retrieve src but it return only one url not all

$document = new DOMDocument();
$document->loadHTML($variable);
If any one have idea how to get all the src in array it's great help
 
8:00 AM
maunder chiefly British : grumble
 
!!friday
 
@SebastianBergmann I dunno, but dominant is an obvious falsehood ...
I only knew of wikimedia and facebook as serious users ...
and wikimedia dropped it
 
[ Feature ] Add function to safely print nested objects / arrays in Exceptions – #78683
 
8:22 AM
/me waves
 
@SebastianBergmann not many, but it's really well used inside FB, and evolving surprisingly fast
 
sigh
 
\o
 
@ircmaxell What, you're in London and you didn't tell me?!
 
8:38 AM
@Derick Sorry, I talked about it in here a bit, thought you saw.
heading home tonight unfortunately
but will see you next week anyway
 
true, but I could have been having beer instead of yelling at the telly
 
That's quite fair
 
Seems I forgot to announce RC5 too
RC4 even
 
9:09 AM
@Jeeves \o
 
some.address.it.wont.ever.reach@‌name.dk – #78684
 
Again it's already 10:15, and have done fuck all.
 
it's friday ...
 
What are some examples of some really good documentation that you've seen for tools/frameworks/libraries
 
@ircmaxell PHPBench has some pretty awesome docs: phpbench.readthedocs.io/en/latest
 
9:24 AM
Thinking docs for complex systems that explain how everything "fits together"
 
@JoeWatkins Doesn't help if I need to get a presentation written by the end of today
 
10:06 AM
wong.. – #78685
 
wong indeed
 
10:24 AM
I wish we could get PHP to evolve as quickly as Hack. I don't imagine FB has to worry much about legacy code with the amount of money it can spend on it.
 
10:36 AM
it's less "worry" about legacy (that is a significant concern), it's more that there's a closed set of code using it. Want to know how many people use a feature? Just grep for it...
 
Narrowing occurred during type inference – #78686
 
meh, php evolves plenty quickly ... said every C programmer in unison ...
 
hehehehe
 
10:57 AM
)))
 
phar.io interesting...
 
11:16 AM
@JoeWatkins It's like old people telling their children are growing fast
 
--disable-all don't imply --disable-opcache-jit – #78687
 
@ircmaxell Was nice meeting you yesterday :D
 
I'm struggling to come up with an example of why invariance is enforced for property types. I mean, the Foo/Bar case is fun, but it's not a real example. Any hints?
 
@Derick I assume you're talking about why covariance is not allowed?
 
I know the reason, just want to show a real life example :-)
 
11:34 AM
Ah. class Container { public object $object; } class DatabaseContainer extends Container { public PDO $object; } - now if you call $dbContainer = new DatabaseContainer(); $dbContainer->object = new PDO; wrapContainer($dbContainer); $dbContainer->query("BOOM?!"); with function wrapContainer(Container $c) { $new = new Container; $new->object = $c; return $new; } - i.e. operations replacing something with the parent class.
@Derick though even in this case you could argue that, why don't we just add a runtime assertion for instances of DatabaseContainer that $object will always be PDO? and have it blow up inside wrapContainer()? not sure what I'd answer here except "we want to assert as early as possible"
 
Invalid float serialization – #78688
 
@bwoebi Pastebin? I can't read code on one line
 
@Derick sorry, just typed that on my phone
 
ah
I'll reformat myself
FWIW
 
Gosh there are 1381 FR on the bug tracker ...
And a bunch from the PHP 4/5 era
Also @Derick should I continue to assign bugs/fr DateTime related tickets to you on the bug tracker or not?
Also sorry @cmb I'm assigning you to COM Feature request so you can have a look at them and maybe close them if they are now irrelevant
 
cmb
11:48 AM
@bwoebi, that's basically what Eiffel does to support covariant parameters.
@Derick, read-only properties could be covariant; write-only properties could be contravariant. read and write properties have thus to be invariant.
 
Yeah, an example here from when I was wondering the same thing
 
@Girgias likewise :)
 
@ircmaxell Sounds like we need a census.
 
@MarkR the issue that we have (that Hack doesn't) is reaching all users. Impossible (or at least highly highly highly unlikely) to hit more than even 1% of users for us. For FB it's 100%
 
Wes
\o
 
11:58 AM
A weighted sample + some statistics is still pretty useful.
 
@Derick it's missing a & before the $c in the function signature, I noticed, and should be $c = $new instead of the return then
 
@cmb I know the reason, I just didn't have a good eample :-)
 
@cmb uh, didn't know there are actual languages doing that
 
cmb
That's highly controversial with Eiffel, and perhaps the reason why the language never got much traction.
@Derick, you could use any example why covariance won't work for parameters.
 
Closure::fromCallable() doesn't handle [Closure, '__invoke'] – #78689
 
12:10 PM
guys, when i get the data from the DB, characters like é are showing as ?, when I run the same code on a different server, it works fine and it's showing, anyone got an idea if this might be a server related issue?
 
sounds like a default encoding config
 
just noticed that server A is running 5.6 and server B is php 7, also found that php 5.6 has some issues with encoding
swapped php version, didn't make a diff ^^
 
INI similarities?
 
is there a fast way to check on that?
 
I mean, you could do parse_ini_string on them both then use array_diff, but it's probably quicker to just look in notepad
 
12:22 PM
Morning
 
@StatikStasis o/
@MarkR don't see / or can't find any diff
 
nothing immediately comes to mind
 
website charset is utf8, db connection is utf-8, default_charset is also utf-8, table collaction is utf-8 what am I missing here?
 
12:39 PM
@MarkR when I just echo é for example, it prints it fine,so it has to been a probleem between the db and the data retrieval I would suppose?
 
Is it coming up as a ? i nside a black diamond?
 
Hi Guys,
Im actually a laravel developer , im not so familear with symfony.

Here i got this project through FTP with Composer so
1) Extracted and set it up in my local.
2)Change the permissions of the "app/cache/" directory so that the web server can write into it.
Change the permissions of the "app/logs/" directory so that the web server can write into it.

3)Changed DB configuration and used php bin/console doctrine:database:create
4)then imported the SQL DB.

Im currently stuck with this issue, can any one help
[
exception => Exception(Symfony\Component\Debug\Exception\FatalThrowableError): Maximum function nesting level of '256' reached, aborting!
]
it would be great if anyone can help..
Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Maximum function nesting level of '256' reached, aborting!" at /home/dev707/project/capeesh-folders/live/vendor/doctrine/collections/lib/Doctrine/Common/Collections/AbstractLazyCollection.php line 47
 
@MarkR black diamond
 
@ArunP did you try googling Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Maximum function nesting level of '256' reached, aborting!"?
 
@Tiffany Yup and Got this answer stackoverflow.com/questions/13213378/…
 
12:51 PM
and?
 
I tried that one , but its not worknig.
@Tiffany The issue here is that the project is working fine in live server. i Just copied it to my local using FTP. Iam having php version as LIVE ,in this case the project should run fine right?
 
it depends on how your local environment is set up compared to your live environment.
 
is there any thing that i missed in these steps ```
Im actually a laravel developer , im not so familear with symfony.

Here i got this project through FTP with Composer so
1) Extracted and set it up in my local.
2)Change the permissions of the "app/cache/" directory so that the web server can write into it.
Change the permissions of the "app/logs/" directory so that the web server can write into it.

3)Changed DB configuration and used php bin/console doctrine:database:create
4)then imported the SQL DB.
 
preferably, they should be exactly the same
it depends on how your live environment was set up
 
Almost the same , I think
 
Wes
12:54 PM
hey tiff \o
i haven't seen you in a while also. i probably was distracted though :B
 
I hope you are all fridaying with maximum possible levels of friday ...
 
@Wes yeah, been away, hiding under a rock. Back to getting my life in order.
 
@LeviMorrison yes we use return values for follow ups, PDO::__construct returns an instance of pdo, then we use the database information there and tag it to the object id, to be re-used for PDOStatement::execute. its often stuff like function 1 has metadata, that we want to use when making a span for function 2
 
@MarkR basicly when it's in the database like zéé it shows as z��, when i edit through the website, it will become readable but it is stored in the DB as zéé
 
1:11 PM
Database persistent connection leaks with ZTS and Event, Worker MPMs – #78690
 
it's so weird that when we migrated from 5.3 to 5.6 this became an issue
 
morns
 
Wes
@Tiffany hope it's all fine/better
 
1:43 PM
o/
 
@Wes it's getting there, that's the important bit
 
Wes
hug
 
thanks
 
high five
 
1:48 PM
hugs you all
 
Wes
cries
 
slaps @Wes on the butt
 
I'm finally getting my apartment cleaned. Actually cleaned. I'm about to mop my kitchen floor.
 
Wes
@StatikStasis kinky
 
I think I've mopped my kitchen floor maybe once since I lived here
 
1:49 PM
@Wes Football-style =P
 
Wes
lol
roomba @Tiffany ?
 
@Tiffany heyo, nice to see you after so long and best of luck
 
It was suggested to me to use boiling water in my mop bucket, but I poured the cleaning solution in first before the boiling water... it steamed up some of the cleaning solution into the air... my sinuses are a tad shot
 
Wes
boiling water seems excessive
 
guaranteed cleaned at least
 
Wes
2:00 PM
i use ammonia. that's hardcore
 
I'm using a cleaner that was used by an animal shelter I used to volunteer at. I figure if they use it around animals, it's hopefully safe enough around mine
 
@MarkR it is possible this is a problem because server A has mariaDB and server B has mysql?
 
It's possible sure. If you're using the same code but your servers are different then that would be something to look into
I'd also look at UTF8 vs UTF8MB4
 
yeah already tried to change that aswell, but no result :(
 
hi all! I make a simple website in laravel, minimal js. I want to have some editable data like photos, company description, etc using inputs. I don t need a database for now. I know that I just need to save those data in files. It is a bad idea to save them in permanent cache? Or which is the propper way to store some kind of 'singlethon' datas like this?
 
2:41 PM
@Wes unrelated, you should consider buying some of these, and definitely not combining the two things in any way.
 
3:11 PM
DateTime ->modify incorrect behavior in some time zones – #78691
 
3:31 PM
define() and defined() not behaving correctly on Windows 10 – #78692
 
4:21 PM
@Naruto @MarkR what's the issue (can link me to the earlier discussion if its easier than summarising)
 
Naruto was having issues with getting back corrupted encoding on one of his configs
 
4:46 PM
I would definitely not expect mysql and MariaDB to behave exactly the same any more.
 
^ this. You should name mariadb what it is. Dont make the error to tell youre mysql compatible.... Its really painful if the first mysql server comes by
 
5:26 PM
Any objection to making zend_concat3 and co ZEND_API for PHP 7.4?
/cc @NikiC @bwoebi @JoeWatkins et al
It's useful for namespace segments (which is mostly what zend_compile is using it for), but also other places like {$class}::{$method}.
 
or a var args zend[_string]_concat ... 3 seems awfully specific ...
 
It comes up a lot, actually.
 
sure, but if we are exporting something ...
 
Wrapping things in braces is another.
For other cases we already have smart strings and such, yes?
 
I don't object whatever, it's just 3 for an export seems specific ...
 
5:34 PM
@LeviMorrison I'd probably prefer a zend_string based API
 
That's fair.
 
We have interned strings for backslash and ::, so it would work for the existing use-cases
And as Joe said, making it a variadic API probably makes sense
 
So... chances of it getting into 7.4 are looking slim then, since it's not just exporting an existing, well tested function.
 
Why would you care?
Unless you're specifically writing an ext for >= 7.4 you'd have to polyfill anyway, right?
 
Yes, but I might actually have such an extension.
Less code I have to maintain that deals with strings, the better.
 
5:40 PM
you can merge it into 7.4, I'm pretty sure we can rely on the behaviour of the apis required :)
 
I haven't looked at the guts of smart_str and such; but for arbitrary string concats it should probably use that internally if it's more than 2 or 3 strings, right?
 
No
smart_str does smart allocations
In this case you can precompute the result size and allocate precisely
 
For 2 or 3 strings, sure. You mean precisely compute it for the entire variadic, even if it had, say, 10 strings?
 
Sure, if you need to do conditional concats and numbers and so on you use smart_str. But this would be nice for the small stuff
So you suggest to have rather have just concat2 and concat3, because more doesn't really occur in practice anyway?
 
5:45 PM
Pretty much, yeah.
I'm not every savvy with va_list; can you walk them more than once without copying? If not, is the copying even an expense worth caring about?
I suppose it may still be nice to have an api that can concatenate a lot of strings that you already have, even if it's not used in practice very often.
It seems you can walk them more than once as long as you use va_end and va_start correctly.
So you could walk the args to calculate the length of the alloc, then again to memcpy them.
 
@LeviMorrison Overall I'm okay with having just zend_string_concat2 and zend_string_concat3 if it doesn't seem that more occurs in practice
variadics are a bit icky in c ^^
I guess either way would be fine
 
An array of const char* pointers terminated by a null maybe get the job done too in a slightly cleaner format
(unless you need to deal with null bytes, then you'd need an array of structs)
 
6:21 PM
@NikiC I think the function is fine as is, you can then add a zend_always_inline zend_string *zend_string_concat3(zend_string *a, b, c) { return zend_concat3(ZSTR_VAL(a), ZSTR_LEN(a), etc.); } - the other way round you'd have to first allocate a zend_string if you only have a char * fragment…
 
@bwoebi I'd be happy with that as well :)
Though I wish we had a better naming convention for distinguishing string vs char apis
 
yeah it sort of ended up being zend_string prefix vs anything else… and not always
 
6:38 PM
I can never remember if str is for zend_string or if string is or if it's the wild west :)
 
@LeviMorrison It's super easy: smart_str for zend_string and smart_string for cstr :P
 
"easy", right :)
 
That's the joke
 
And then there is zend_concat3, which takes cstr but returns zend_string.
 
6:54 PM
and this is why object orientated programming was invented :P
 
 
1 hour later…
8:16 PM
@ operator evaluates @$foo['undefined'] to $foo[0] on strings – #78693
 
I actually found a rare legit use case for php://fd/X… hm :-D
Always thought this functionality to be odd… but there we are, I needed it.
 
8:55 PM
@bwoebi @JoeWatkins Had a friend of mine who had his team use XAMARIN quite a bit, share some of his experience with the framework. Just thought I would post here in case someone searches for XAMARIN here later on and is looking for some more info beyond what we discussed the other day. Feedback to follow...
Although Xamarin with Unity3D worked well, we could not get the same efficiency in development nor of the app when using Xamarin alone.
Our experience with Xamarin was close to the one with any other cross-platform framework:
- for small apps it works well;
- for pixel perfect UIs the work has to be done twice for iOS and Android - very hard to get iOS pixel perfect;
- when it comes to animations and great UX all lack flexibility and with React Native we've seen performance issues;
- when access to hardware specific features is needed - like maps or motion sensors - we had to write native plugins and integrate them with the cross-platform part of the app.
All-in-all, based on our experience, cross-platform works OK-ish for back office and small apps.
I still plan on using since my use will be very simple and nothing hardware specific. Main purpose of app is posting and retrieving data from database.
I believe it will be perfect for my needs.
 
9:41 PM
Appending to a variant array causes segfault – #78694
 

« first day (3289 days earlier)      last day (1659 days later) »