« first day (1865 days earlier)      last day (3309 days later) » 

13:03
who is who? ^
You can tell who someone called Pierre is from a mile off :P
@FlorianMargaine LTR Derick, Julien, Damien, Pierre, Anatol, me, Bob, Zeev, Remi
@NikiC thanks
does anybody know a good code formatter/beautifer lib that can handle array indentation? php-cs-fixer doesn't seem to modify arrays very well
@hohner phpstorm code format?
13:17
@Gordon I need it in a PHP script, not an IDE
seems like it's not been implemented yet in php-cs-fixer: github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1438
why isn't PHP CS fixer using PHP-Parser yet? This thing just created an infinite loop somewhere in my code.
+ it messes up with new syntax it doesn't recognize instead of bailing out or failing.
I just ended up writing what I needed myself. no faffing around
@ircmaxell The issue seemed very unimportant to me (unimportant as in there being no chance of this actually adversely affecting anyone), so I never bothered to fix it and was interested in it only insofar as it represents a general issue in the indirection handling. Of course that was a misperception on my part: Even if it has no practical impact, "count() doesn't work" is bad PR, which does make it a critical issue.
@marcio Because PHP-Parser really sucks if all you're interested in is formatting
13:42
My first Bash script hastebin.com/vexuzohiwu.pl :D
oh gosh I am not smart
I was gonna suggest to Anthony that password_compat use PHP 7's scalar type hints (rather than casts) when available
@Andrea lol
but, uh. that's rather pointless, for reasons that should have been incredibly obvious to me
Such hinting, much polyfill, wow
All that said. PHP 7's scalar types mean we can have better polyfills now, because you don't have to crappily emulate zpp.
13:45
Hey PHP internals friends! Totally last minute, but anyone want to represent PHP internals for today's PHP Roundtable episode? Just to brainstorm about adding immutably features to PHP source. You don't need to be a functional program theory expert, just brainstorming implementation details. :)
@SammyK Not sure if I replied to your mail, but I won't be there
@NikiC No worries - thanks buddy :)
We just might have PHP internals under-represented for this one so I wanted to send out a general invite. :)
I'll be on a plane about that time
You coming to Chicago? :D
No... what's in Chicago?
13:48
Me
Ah ^^
and the wrong type of pizza.
No no no, Chicago shipped 20 years ago. This release is Threshold.
(if you get that joke you get a $_COOKIE)
@Andrea Windows 95! :)
13:51
stop talking to @NikiC. He needs to steal the elephpants for me. he doesnt have time for you now
@SammyK yep :D
We're my $_COOKIE?
setcookie('cookie', ':-)', 'what does this parameter do');
Damn bash scripting isn't that hard I tought it was very difficult to learn
oh, that's actually an error
setcookie('cookie', ':-)');
setcookie('🍪', '✅');
13:53
@NikiC really? I thought it was the most stable alternative when it comes to pretty print valid code.
function ➡️🍪(...$…) { return setcookie(...$…); }
➡️🍪('🍪', '✅');
Haha
@marcio Well, if you want to lose all formatting. Usually you don't
@Andrea This one is tasty! :)
When's my PHPNW15 talk video coming out D:
13:58
@marcio I guess php-cs-fixer doesn't have a in-the-middle representation for the code. Also php-parser would probably be too slow for reformatting a whole project (although I don't know how php-cs-fixer is fast currently)
Is there a different term/idiom used for a moving company? I keep getting a lolwut from non-Americans when I try to use this term.
posted on November 24, 2015 by nlecointre

/* by patoch */

"Removal Firm" @SuperNoob Not sure.
@nikita2206 I tested that, it's very fast actually! but what @NikiC is saying is probably a showstopper as php-cs-fixer is not like gofmt... it tries to preserve your code style and only fix a few things.
Hmm. Maybe it's just not common where they're from
14:02
A moving company, removalist or van line is a company that helps people and businesses move their goods from one place to another. It offers all inclusive services for relocations like packing, loading, moving, unloading, unpacking, arranging of items to be shifted. Additional services may include cleaning of the place and warehousing facilities. == Overview == According to the U.S. Census Bureau, 40 million Americans have moved annually over the last decade. Of those people who have moved in the United States, 84.5% of them have moved within their own state, 12.5% have moved to another state and...
"removalist" or "van line"?
I'll try that. Thanks guys. Sorry to derail from PHP discussions
@nikita2206 just a heads up, I'll be moving to another place this week and I'll probably be without internet for some days, so our RFC will have to wait a few more days.
Will you be using a removalist?
@SuperNoob nah, don't worry about it :)
@marcio sure no hurry here. Moving cities?
14:04
yup ^^ new job
where now? :)
@Andrea that coincidence...
@marcio coincidence?
@nikita2206 I'm on a company that is in São Paulo and other cities, they made me an offer to stay in Manaus for a 2 year project. It's a weird city, a bit remote... for a reference, the latest FIFA world cup had some games there en.wikipedia.org/wiki/Manaus
14:12
hi. how can use jquery whit php? i've learned about jquery recently but i do not know how to use
why this code do not act?

<script>
var $checkbox = $("#checkbox");
var $selectMenu = $("#selectMenu");

var checkedContent = "<option>not bad</option><option>bad</option>";
var uncheckedContent = $selectMenu.html();

$checkbox.on("click", function(){
var $this = $(this);
if($this.is(":checked:not")){
$selectMenu.html(checkedContent);
} else {
$selectMenu.html(uncheckedContent);
}
});
</script>

<input type="checkbox" name="checkbox" id="checkbox">
<select name="test" id="selectMenu">
<option>very good</option>
@marcio the city looks pretty
@sajad Hi @sajad, could you please use pastebin or a similar service for your code, rather than pasting it in chat please?
@sajad Easy.... $.post('/url', { paramName: 'paramVal' };
Thats for POST requests.
$.get for GET requests.
Simple googling would've done the job.
@nikita2206 I'll know if it's heavily photoshoped very soon this week j/k :P
@HassanAlthaf where are you from hasan?
14:19
Sri Lanka. I cannot help right now though, I'm busy working.
@HassanAlthaf :D
@HassanAlthaf i do not need help!
'morning
Yay, we got snow here!
(the lazy way to compile PHP to JS)
@FélixGagnon-Grenier where?
@Andrea Damn, what are those Opcodes doing ther?
look at the bottom, test.php
@Andrea The assembly code to describe what is happening in the PHP code?
So… last night someone posted some string to int conversion for ArrayAccess stuff. I can't reproduce it.
opcodes aren't as low-level as assembly, but they're a similar idea. they're what the PHP interpreter compiles your code to
14:28
I can definitely see the array and ArrayObject structures doing that behavior, but not in general ArrayAccess.
@LeviMorrison it's not an ArrayAccess thing
it's a compile-time optimisation PHP is performing on certain []s
@Andrea But don't assembly language instructions consist opcodes with the labels, operands and other stuff?
I'm assuming these kind of opcodes don't have different addressing modes like Assembly such as direct, indirect, relative, indexed etc?
Ah… it only happens on literals, not variables that are propagated.
@HassanAlthaf there's no labels in the compiled output. PHP opcodes do have operands, they're in columns
Then this is firmly in the realm of bugfix.
14:29
@HassanAlthaf PHP's virtual machine is high-level, it works in values rather than memory addresses
@LeviMorrison correct
@ScottArciszewski fyi, about that advisory, the zendframework/zendframework repo used to be a single thing before 2.5.0, that's why I'm asking for that change
<?php
class Dictionary implements ArrayAccess {
	function offsetExists($offset) {}
	function offsetGet($offset) {}
	function offsetUnset($offset) {}

	function offsetSet($offset, $value) {
		var_dump($offset);
	}
}

$Dictionary = new Dictionary();
$Dictionary["12"] = 0xDEADBEEF; // int(12)

$str = "12";
$Dictionary[$str] = 0xDEADBEEF; // string(2) "12"
@HassanAlthaf google "abstract machines"
@LeviMorrison hrm
Someone a good API for SMS Except Twillio
14:33
Interesting case
Why do we even optimise this case? Who does $array["12"]?
Seems like wasted cycles and interpreter complexity to me.
+additional code
yeah, it would only provide a benefit in rare cases
@LeviMorrison it's in offsetGet
14:36
@Danack That case is fully reproducible; try running it.
@LeviMorrison I meant the conversion is done when calling offsetGet - 3v4l.org/mdSXC
@Andrea We optimize it for the cases where somebody does $array["not12"]. Which is all the time
@NikiC you can't optimise that case...
@Andrea you optimize it by avoiding a numeric string check...
@Danack It's just because of a literal; look at the link you posted. The literal is an int(12) and the variable is string(2) "12"
14:37
@Andrea Wow, so even PHP runs on a Virtual Machine? Is it all languages running on Virtual Machines or what?
@AwalGarg Will do after I'm done listening to this lecture.
right now we can simply use a CONST dim directly, without checking it for numeric strings
@HassanAlthaf most of them, it makes things a lot more efficient
Anyway, does anyone have any idea where this "optimization" is happening?
@Andrea I see, is one of the purpose to use a VM to achieve platform independency?
@HassanAlthaf Yes.
14:38
@LeviMorrison "The literal is an int(12)" the code is $bar = $Dictionary["12"]; - I literally don't see an int.
I see.
That is amazing.
@HassanAlthaf yes, but PHP by nature is difficult to directly compile, so we need a VM anyway
@Danack Run the code.
The handle_numeric_op part
14:39
@Andrea Any reason why it is difficult to directly compile?
@NikiC Thank you. I'm going to find out if we have a test case for it :D
As a less experienced than you guys are php developper, I am somewhat sad when I see things being so quickly dismissed because "who does that?". Who knows who does that. There are a lot of people using php. Don't they matter, even a bit?
PHP is dynamic
We don't have the type information needed to produce efficient assembly/machine code
Oh yeah, I see.
@HassanAlthaf Never heard the quote: "The best thing about Java is the JVM" ?
14:40
Always did.
But never knew VM was the thing behind it.
@LeviMorrison I'm running the code....and seeing that a string is converted to an int when it is used directly, and it is not converted to string when it is placed inside a variable. Not sure what I'm meant to be looking at other than that.
I always thought Java compiled to bytecode which is understood by the JRE.
And translated it into machine code.
@Danack That is what you are supposed to be seeing. Bug or not a bug?
@HassanAlthaf JRE is a VM
@LeviMorrison It's a bug
14:41
Ohh.
it compiles it to machine code at runtime
It just needs be fixed carefully
Damn, my ignorance.
@LeviMorrison Not a bug imo, as it's by design.....but I haven't heard an explanation of why it is like that, the only thing I can think of is:
@NikiC Well, I think so :D. I was just asking it to reiterate why I care.
14:42
Kinda focusing on Assembly and JS these days.
@HassanAlthaf There's lots of compilers that take a given language, and compile it to JVM bytecode.
(brb need to test an example.)
Even one for PHP
Yeah I know.
@Leigh If something behaves differently depending on whether you use a variable or not, I don't see how that can be anything other than a bug
14:43
You can create Desktop applications (GUI) in PHP right?
(Note though that some bug fixes may be indefinitely delayed if fixing them is impractical ;)
I did see a compiler or whatever it was to do that a while back.
@NikiC I assume you meant @Levi ;)
@HassanAlthaf technically, yes
s/@Leigh/@LeviMorrison
14:43
@AwalGarg Hey man hack my site. ;]
@AwalGarg Do you know any good book/video course that teaches PHP security?
@NikiC ahh
@NikiC Definitely agree.
maybe we could use a flag
14:44
@HassanAlthaf I already told you atleast 10 times. Read OWASP.
Other than OWASP. :]
@LeviMorrison What I'm guessing is that it was chosen to be like that to make code like this be 'easy' for end-users:
$temp[1] = 'one';
$temp[$_GET['foo']] = $_GET['bar'];
I don't really get things fast, and OWASP really skids fast.
And OWASP is a bit boring. A video course would be amazing. ;]
watch lectures by @ircmaxell then? I dunno. I don't like books on tech
they get outdated real fast
i.e. for the query string ?foo=1&bar=2 - it would be confusing to dumb programmers if they had two entries in the array with a string '1' and an int 1.
14:46
Oh, can you link me to the lectures?
@AwalGarg books on tech are worth buying if they're for old tech or teach principles
buy SICP, don't buy "how to use php 5.6"
And the arrayAccess stuff is trying to be consistent with the array behaviour....even though it's a bit silly.
@Andrea hah, yeah, stuff like dragon book et al never get old :)
@Danack it's not "trying to be consistent"
@Danack I think you can never have numerical key as a string in an array, it's checked in hashtable functions somewhere
14:47
@AwalGarg Imho the dragon book is pretty bad
@Andrea hmm?
It did get old to the point of not being really useful anymore
arrays and objects are indistinguishable as operands to the [] operator at compile-time
@NikiC repeats itself too much? That's one thing I don't like about it. Any other reasons?
It has a full two pages on SSA form, or something like that
14:47
oh
we simply don't know if the variable $foo in $foo[0] is an array or an object
yeah, I would really like a "dragon book" on more recent stuff like JIT and AOT etc.
Why describe algorithms on use def chains in excessive detail when everything nowadays is SSA based
Stuff like crenshaws never gets old :D
14:49
Okay… why does $var = "12"; not get converted but it does when it is an array key?
@Andrea ok.......but the ArrayAccess behaviour is different from array behaviour for floats 3v4l.org/5lUht - so it's trying and failing.
Like, why do we do this at all?
Anyone know of a bug report or commit where it was introduced?
@NikiC Do you happen to know of a more recent alternative that you can recommend? Was looking for one the other day
@Danack no, it's not
it's not trying to emulate arrays.
@FélixGagnon-Grenier Thanks a lot.
14:50
but we optimise $foo["bar"] by converting "bar" to an integer if it passes the numeric string check arrays use
@Andrea "optimize"?
I think the optimization would be creating a zend_string with its hashcode done already or something…
@LeviMorrison Yes. @NikiC explained why this is an optimisation. It saves us having to do a numeric string check at runtime for the common case. Otherwise we'd have to check, say, $_POST['password']'s index to see if it was numeric
@Andrea It's actually not that easy to understand what you're trying to convey, when you only use negatives.
@Andrea Only if it has to do a hashcode, yes?
@Andrea yet another case of "optimization" producing unexpected edge cases
this seriously bothers me
14:52
@LeviMorrison yes, that's a fair point
@ircmaxell Yeah, me too.
@ircmaxell yeah :/
Okay, so we all agree that this is a bug, yes?
@Ocramius Yeah, that makes sense
@Danack arrayaccess doesn't do any array emulation. It calls offsetGet/offsetSet with the index value and new value (if any). That's all. It's as transparent as you'd hope it would be.
14:53
If I'm a bit short on words today, I apologize (though most of the community probably rejoices at that notion)
@ScottArciszewski sorry for annoying you with that stuff tho, just my normal review process :|
Do we have an AST dumper online somewhere?
nah, I'm not annoyed at al
I'm just really tired XD
@LeviMorrison yes, however it's been a bug long enough that I'm not sure what we do about it 3v4l.org/dIG8S
@LeviMorrison I'd say so. As you point out, there's another way we could optimise it, anyway
14:54
Hm, there was an AST export function in zend_ast.c. can't remember if that actually dumped it or not though
@ircmaxell Eh, I'm hopeful. It changed in PHP 5.4 which is pretty recent :D
@ircmaxell We fix it.
@LeviMorrison "recent"
it changed in a version that's currently EOL
Levi has pointed out a workaround that avoids a perf hit
I would prefer the workaround had a performance hit
14:55
Maybe we should fix it in 7.0, though it might break something
I have a feeling this won't break much
@ircmaxell It's unlikely to.
Well, it probably still has a perf hit, just a smaller one than not doing anything.
It would only hit ["123"] which is an unlikely case
14:58
@ircmaxell nudge nudge
@Gordon got 1 minute
calm down
Can I write the patch? I'll do it once I've eaten my lunch ^^
@Andrea Sure.
If we put this in 7 it should be in 7.0.0. Better an unexpected minor break from the RCs in GA than an unexpected minor break in a point release
would this fix sum up as a reason to require RC8?
I saw 5.x -> 7.0.0 as the perfect opportunity to make whatever BC breaks are necessary
7.x -> 8.0.0 will be the same
@marcio doubt it
I'd prefer an RC8 anyway.
Like… I don't see why some people are making it such a big deal.
I'd like to buy us more time so I can make my contributor montage
15:02
well, it seems doable. +1, I'd prefer RC8 too.
my fear is there's a bug hiding under our noses on the bug tracker or in a GitHub pull request and we haven't noticed, but I can't find evidence of that
(heh but not because the montage)
(or on a community site from someone who hasn't reported it officially 😠)
@Andrea Can I open an official bug report first?
15:04
@LeviMorrison we have one already
Laruence is really bad at just saying "not a bug" instantly, ignoring what is actually in the bug report.
@Andrea there was a GC assertion that I was hitting very often, in a very non deterministic way so I could never reproduce properly. Lately, this bug is gone... but I have this weird feeling it's lurking (it wasn't fixed for sure).
hehe, yeah that's totally a doc bug...
Talking of which, @PeeHaa have you achieved denouement with your opcache bug?
15:06
I will update the bug.
It works on my new machine (RC7) still need to do proper testing
speaking of documentation, I added a ref to random_compat months ago that's sitting uncommitted :P
Personally I think 7.0.0 will probably have serious memory safety-type bugs on some systems. We'll miss something. Probably opcache.
(it's always opcache)
(why isn't opcache dead yet D:)
opcache + phpdbg is causing some troubles too, but it's the kind of thing that happens on one run and then later when you try to crash again it disappears :/
@FélixGagnon-Grenier E_CONTEXT? And in general no.....people who are doing insane stuff shouldn't matter when considering how to improve stuff in general. Making tools for sane people is far more productive than trying to make tools for crazy people.
15:10
tools for crazy people...
TCP?
@marcio opcache: the original heisenbug
@Andrea I am worried that people already know of the bug...
@Andrea I updated the bug report. I also assigned it to you :smirk:
@LeviMorrison totally agree. It is sad how people have handled this issue.
hmm, maybe if I activate opcache.file_cache_only on dev too the heisenbug will be preserved on subsequent runs.
15:13
"I am worried that people already know of the bug..." I've heard rumors
I am fairly sure I've hit this bug before in my Ardent\Collection\hash function and just ignored it because I was in a rush before. Anyway, here's an example of why it's very definitely a bug in my opinion: 3v4l.org/XGtVh.
When's PHP7 releasing?
@HassanAlthaf sometime in late 2017 why?
@HassanAlthaf You just killed a baby elephpant. :*(
15:14
I just killed a what?
eleph pant?
@marcio Sounds familiar
Jun 27 at 17:07, by marcio
> 05:20 <Rasmus> php: /home/rasmus/php-src/Zend/zend_gc.c:226: gc_possible_root: Assertion `((zend_refcounted*)(ref))->u.v.type == 7 || ((zend_refcounted*)(ref))->u.v.type == 8' failed.
> 05:20 <Rasmus> ugh, something in my userspace code is breaking it.. time for some sleep

^ f*ck this damn gc assertion, it made me loose half my Thrusday this week.
if I could grok the execution of the SAPI code, I might have found it by now
the rumor goes: there's an alleged remotely exploitable FPM bug
looks like it's a known bug too ^^
15:18
I also agree that at some point we need to ship.
@ircmaxell yeah :/
omlfolfoeleolf < / don't know what that means but dammit I have to change the layout of a website/application which is full of inline-css ><
one lf the careless attitudes I hate is that people should be allowed to make the interpreter segfault
shared hosts exist
I just don't see why we can't oblige when a regular contributor asks for RC 8 because of a bug they hit that has a known fix.
@LeviMorrison almost
15:23
anyone knows what GC_PURPLE means? github.com/php/php-src/blob/master/Zend/zend_gc.h#L48
@LeviMorrison I think it is far worse to ship something unstable...
user1642018
hi all.,
@marcio yes, read the paper linked to in the docs
@marcio it is part of a scanning algorithm to find circular references.
user1642018
15:25
0
Q: Why simple_html_dom isnt getting div content for specific pages but its working for other pages on same site

AMBi am trying to get plaintext title from <div id="title"></div> tag from this url https://thepiratebay.gd/torrent/12745130/ i am using php like this <?php require_once('simple_html_dom.php'); $torrent_page_url = 'https://thepiratebay.gd/torrent/12745130/'; $html = file_get_html($torrent_p...

user1642018
help needed.
@LeviMorrison we can oblige, but we're wondering if we should due to upcoming holidays
@Danack @ircmaxell ty, I didn't know there was documentation for that.
@Andrea People act like there isn't a several week gap between Thanksgiving and Christmas…
And let's be honest, Thanksgiving is only a US holiday…
Technically, it's a Canadian one also. /xkcd1475
15:29
Breakpoint 1, zm_startup_astdump (type=1, module_number=29)
    at /home/leigh/php-strict/astdump.c:22
22		orig_ast_process = zend_ast_process;
(gdb) p zend_ast_process
$1 = (zend_ast_process_t) 0x0
In MINIT zend_ast_process is still null... ok...
I don't want a lot for Christmas There is just one thing I need I don't care about the presents Underneath the Christmas tree
I just want #PHP 7.0.0 More than you could ever know Make my wish come true, oh All I want for Christmas is "\u{}" (Ooh, baby!)
2
claps
😊
🎄🎁🎁
@Andrea So 7.0.0 street date is now Dec 25? ;)
15:34
lol
Abe
Abe
baby jesus & php7 /me opens photoshop
Are the three wise men going to bring gifts of gold, frankincense and Myrrh?
Interesting post on reddit: Python as a PHP Developer.
"\u{andrea}" needs to be a thing
it would be the 24th if anything ;)
15:39
@Machavity maybe :p
@MarkBaker the three wise men, hailing from Israel, will bring performance, stability and enterprise-readiness — Zend marketing (probably)
10
@SammyK ooh, we could hide easter eggs in \u{}, couldn't we? :p
(we also definitely shouldn't, but...)
make it a special surpirse, like preg_replace /e
hahahaha
15:47
\u{llehs}192.168.0.102:1337 -> reverse shell
@Andrea Indeed! I was just thinking about the need for easter eggs in PHP the other day in fact
@Machavity Since it is almost Christmas, how having a picture of hanging the PHP7 logo on the Christmas tree?
@HassanAlthaf That's crazy talk. PHP7 is the bright star at the top, shorting out all the other lights on the tree
@Machavity Boom. Another dead elephpant. :(
15:54
I would far rather wait another rc cycle or two and have a PHP7 with such fundamental bugs fixed and tested than see the disillusionment in PHP7 goes live with those bugs
@MarkBaker And another. :(
It's a cull!
Can you guys plleeeaaasseeeee not call it PHP7
I'd strangle whoever started that convention if I had a time machine. :P
@salathe What would you prefer we call it then? PHP6+1?
My PHP7 Elephpant says it's PHP7,, that's good enough for me
@MarkBaker "php7" ;)
@Machavity No, 7 is just a version number.
php doesn't look like an elephpant at all, PHP does
15:58
so PHP7 is an elephpant with a seven stuck on its butt :)
@HassanAlthaf great idea! we already have an easter egg mechanism for the phpinfo() logo
@SammyK phpinfo() has one
LOL who flagged that? :P
@Andrea I thought it was removed
did someone really find "butt" as offensive?
They were probably one of the people who call it "PHP7", those people are weird.
15:59
@salathe me.

« first day (1865 days earlier)      last day (3309 days later) »