« first day (1678 days earlier)      last day (3270 days later) » 

1:00 PM
@DaveRandom yes like public static $var; that you set later on in the code
 
E_INDIAN_TERMINOLOGY
 
@ziGi nope, the max you can do is serialize and then rebuild the object on next request
 
@marcio I guess I didn't make my point very clear. You have to be honest about the nature of people first. Perfect altruists don't exist, hence why many idealistic ideas (like Communism) fall apart
 
@ziGi No, opcache is a cache of compiled code, not program state. You might be looking for APCu, depends what you are trying to do.
 
@DaveRandom nothing but now I am running a request twice and there is a singleton which if there is no instance it instantiates, and on the second run of the request it doesn't go through the instantiation because it thinks it is in there already which is funny, because it did not behave like that before. So I am wondering is there some kind of a setting in PHP that says (keep static state in the same PHP-cgi between different requests) or something like that
 
1:02 PM
@salathe This picture concerns me, makes me suspect someone put a cat under a paper press or something.
 
hehe
 
@Machavity yes you did, I'm just buffer overflowing your argument.
 
@marcio :P
 
@ziGi Either you are wrong and it's be instantiated somewhere else, or you put it in some other persistent data store (e.g. $_SESSION)
 
1:04 PM
@Machavity haha, "SCREW THIS I'M FORKING"
 
@DaveRandom maybe kitty just think he's an owl :)
 
@Machavity also communism is for the ones who think they are so flawless that everyone should be obligated to follow their rules
 
@marcio Indeed
 
is there any way we can delay one operation and print first result
like print "exe1" then wait 2 sec and print "exe2"
 
@John using sleep() and output buffering, probably
 
1:12 PM
but it prints both the result directly
not one by one
:(
 
Only other way would be with AJAX then probably
 
ohh so sad
threading ?
 
@DaveRandom I was wrong, you are correct, there was a setting for automatic session start which was set to true
 
Hey @DaveRandom - any update on this? :) github.com/php/pecl-database-pq/pull/2
 
@m6w6 Oh crap. I'll do it this afternoon.
Just need to write a couple of tests
 
1:17 PM
@DaveRandom That'd be awesome! Thank you
 
I wish I was less useless at following things through...
 
@DaveRandom follow through as in finish a project/task?
 
Yeh, pretty much anything and everything
 
You are not alone in this one buddy
 
@DaveRandom brofist
 
1:20 PM
sounds painful
 
@DaveRandom :-)
 
@PeeHaa You're coming to PHPSC right?
 
lol
Looking forward to meleeing @DaveRandom with a laser quest gun
 
1:27 PM
lol
 
Man it's likely easier for you than it is for me
5 hours journey for me, bet you could fly there quicker
 
@PeeHaa Screw the conference, I'm going there instead
@Jimbo <insert "your mum" joke here>
 
whole office looks up at me as I burst out laughing
 
do any body know regex ?
 
/no/i
 
1:31 PM
@Sajad Nobody understands regex. it's the language of the gods
 
@Jimbo Bug me again in a couple of days please
 
@PeeHaa Will do, I've set a reminder on my phone (Y)
 
@Sajad Did you mean "does anyone know the answer to my particular regex problem, which I haven't told you yet?"
 
@AllenJB exactly :)
 
waits for the switch to flip
 
1:35 PM
My str: <input id='idname' class='test{any number}' type='button'></input>
example: <input id='idname' class='test12' type='button'></input>
example: <input id='idname' class='test10' type='button'></input>
then
 
Input doesn't have a closing tag
 
how can i replace it with:
New str: <input id='idname' class='test' type='button'></input>
@Machavity you right
i want only replace 'test{anynumber}' with 'test'
 
bye, bye AdBlock+ (you broken piece of shit), hello µBlock
 
@Sajad Have you seen DOMDocument?
 
@Jimbo yes
 
1:38 PM
@Sajad Usually when someone wants to parse HTML with REGEX in PHP, we point them towards DOMDocument as it'll save you a bunch of time, and it's really nice to use
 
@Jimbo I like how you phrased that :)
its much more constructive than "we grab our pitchforks and burn the witch" ;)
 
/me puts pitchfork away again :(
 
@Machavity thats the pitchfork
 
@Jimbo tnx
 
1:43 PM
Aw, I feel all warm inside now. This isn't right, I'm in room 11. Someone fix this
 
@Sajad that said: if you are sure the string will always and ever be that exact string class="test{any number}" you can do it with regex.
 
@Jimbo Damn I was soo tempted to kick you, but I'm not certain anymore how long it will be
 
@Gordon i know, but i don't know regex :(
 
@PeeHaa lmao
 
@Sajad I don't know regex. So I am using regex to parse html
;)
 
1:46 PM
@PeeHaa what ?? do you know regex or not ?
 
Nope. Regex is the language of gods
 
@Sajad A good place to learn RegEx is regex101.com
 
@PeeHaa :)
@Machavity ok, tnx
 
@Sajad It's actually not that hard (for simple things) and fairly easy to pick up once you have a decent resource
 
@PeeHaa s/gods/demons
 
1:48 PM
:D
 
@PeeHaa you don't know what is this in php: {anynumber} ??
 
Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. source
 
@Worf Are you actually working on opcachegui or not? I want to set the roadmap / timeline for the next release so I at least have some reminder I need to do stuff on it
@Sajad Yes
 
@PeeHaa good, what is it ?
 
@Sajad try with /class="test\{[\d+]\}"/
 
1:49 PM
Find out and learn
 
@Gordon tnx buddy
@Gordon preg_replace is better or str_replace ?
 
@Sajad str_replace cannot do regex
 
@Gordon aha, all right
 
Do you regret it yet @Gordon :P
 
@PeeHaa not yet
 
1:52 PM
:-)
 
str_replace is faster but you have to know the exact string first. Regex means you don't know exactly
 
Good guy gurden
 
@Machavity I think "Regex means you don't know exactly" is a good description of what Regex is
What's regex? Well, I don't know exactly.
6
 
@Gordon :)
 
what is the difference between these two. one is -- preg_match("@<span>.*?<\/span>@si", $file, $regs) AND another one is this ---
preg_match("/<span>.*?<\/span>/si", $file, $regs)
i know about preg_match just clarify about patten or regex
 
2:00 PM
@santosh They're the same. The 'delimiters' at the end are just there to mark the start and end of the pattern.
They have no meaning and can be almost any character
 
can we use both / and @ for delimiters in php
for mentioning pattens
 
The cool kids use '#' - not only is it easier to read, it's far less likely to get in the way of doing the matching.
 
posted on May 21, 2015 by kbironneau

/* by MrJ */

 
The really cool kids use ( ... )
 
what are other delimiters we use can any body tell all the delimiter we can use in patten matching in php
 
@santosh The reason why it's a bad idea to parse HTML with regex is that HTML is nested so you can get unpredictable results
 
great, cleared my doubt. so thanks @Danack and @DanLugg
oh, then do you have other solution for this problem @Machavity
 
i have faced the same as you mentioned @Machavity
 
@Danack the very cool kids use () what @DanLugg said
 
2:10 PM
I DON'T UNDERSTAND THE YOUTH OF TODAY.
 
@Danack @Worf Aww… seems PhpStorm 9 will have support for "only a basic scenario" for return types: youtrack.jetbrains.com/issue/WI-23701#comment=27-1000401
 
@Danack you need better drugs to do that
 
As long as there are only syntax errors around the return type I'm okay with that (meaning the whole file doesn't bork). It's unclear though.
 
@Machavity thanks but know the dom element , is there any other way after from these two
 
HI
 
2:13 PM
@LeviMorrison To be fair to them, adding support for unreleased versions of software is slightly demanding of us. However I wish they'd spend more resources on supporting basic language syntax, rather than integrating with framework specific crap.
 
any one here
 
Also the guy seems to have closed the issue, which appears bogus.
 
@santosh Walking the DOM is the cleanest way to do it. It's why the DOM was created. If you ever have two <span> tags nested (or more!) your regex will break.
 
@Danack Oh, I didn't ask for full support. I just want the error to be isolated (not break the whole file).
Well, sort of. The original request was sort of for full support just so they would be aware of it.
But the follow-up was just "please can we not break the whole file?"
 
...
 
2:14 PM
HI i have simple curl to hit the url

$urlRslt = DOMAIN."rckey/index.php?payment_type=bill_desk&step=2&orderId=".$oId."&br=".$br;
$ch = curl_init($urlRslt);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT);
curl_setopt($ch, CURLOPT_URL, $urlRslt);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ress = curl_exec($ch);
 
But it's not hitting the file
am in doing any thing wrong
 
yes
 
@abhi Have you tried stepping through the code with a debugger.
 
@Machavity ya, thats true
 
2:15 PM
no i haven't how to do that !!!
how to deburg the curl call ?
?
 
> All identifiers beginning with an underscore are reserved for ordinary identifiers (functions, variables, typedefs, enumeration constants) with file scope.
 
@abhi Basically using a debugger like PHPStorm allows you to step through the code line by line, which allows you to see what your code is actually doing.
 
Zend Engine violates C naming requirements.
(I think that's for ANSI C (aka C89) but unsure if it's changed in current ISO standards)
 
Okey txs :)
 
@LeviMorrison C naming requirements suck. They must follow PSR!
 
2:22 PM
lol
 
everything that is not following psr sucks
i stopped reading books because they are not written in a psr style
7
 
PSR is a joke now
It's not open source, it's closely controlled by guys who already have standards created in their frameworks and any debates are terribly one-sided
 
@Jimbo That's something new?
 
Hi everybody, I'm facing something really strange where i'm trying to get value of a certain key in a array, and it's return NULL every time... You can see the code and return here : pastebin.com/RTqqMr8N please take 2 minutes to look at it, i'm sure that i'm making a stupid mistake here...
 
@JonathanLafleur either you access the array not how you show it or the print_r is not what you show. pick one.
 
2:28 PM
@Gordon I don't understand your question i'm sorry ?
 
@JonathanLafleur i didnt ask a question :)
 
... so I don't understand your sentence either..
 
all I am saying is that your codepad does likely not represent the code you are trying to debug
 
I'll past it all but it's not revelant...
here's the full code
i've added var_dump and print_r because I wasn't understanding why this CSV column was not printing as supposed ... Actually i'm trying to modify post_title=>11ouest-A to post_title=>11 Ouest A
 
Good afternoon
 
2:34 PM
Hi @Simone
 
may I ask something related to Apache?
 
Depends. If you mean the song by The Shadows then yes, if you mean the web server then no.
 
@JonathanLafleur If your var_dump($data['post_title']); does not give the expected "11ouest-A" then either $data is not what your print_r says or the key is wrong.
 
Also: technically you just did
 
@DaveRandom :D there is no room, also on server fault
 
2:37 PM
@Gordon exactly what I tough, but as you can see in the code it should not differ !
 
@Simone Hint: don't ask whether you can ask a question, just ask the question ;-)
 
morning
 
Hi @NikiC
 
I might post a question on Stack Overflow asking whether I can ask a question on Stack Overflow about whether I can ask a question on Stack Overflow.
 
@DaveRandom -.- loll
 
2:38 PM
@DaveRandom oh god
 
Not sure if it's possible to close a question as a dupe of itself
 
Hey guys
Can someone link me to common and rare security issues in PHP applications and solutions on how to patch them?
*link me to a site which explaons
*explains.
 
@NikiC can you please clone this branch, compile it, and run this: github.com/bwoebi/php-src/tree/switch-optimize
./sapi/cli/php -n -dzend_extension=`pwd`/modules/opcache.so -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.optimization_level=0x400 Zend/tests/jump05.phpt
 
@bwoebi can't do it now
or bah, I'll just do it
 
@DaveRandom that will be migrated to Meta
 
2:44 PM
@bwoebi ran it
 
@NikiC do we get any errors?
 
@rdlowrey We are upgrading our SSL certs today "to get the newer sha-2".
 
lol 'newer' sha-2
 
I'm out of the loop and Google hasn't been kind to me; isn't there something newer than that? /cc @ircmaxell
 
:-)
 
2:45 PM
Guys there was this question in my exams;
A program which runs on a processor and can cause it to crash
 
@ircmaxell when's your last blog post of that series scheduled?
 
Is it one that is compiled or interpreted?
 
@bwoebi It's not written yet. Thinking tomorrow or Tuesday (Monday is a holiday)
@LeviMorrison sha3 isn't adopted by anyone yet
 
@bwoebi Don't get errors with that. But get an infinite loop with my ini file
I'll try to see what the diff is
 
@NikiC infinite loop with ini file? I'm setting -n flag?!
 
2:48 PM
@HassanAlthaf The program causes the processor to crash?
 
"processor" ?
that sounds like like people who are selling "cpu stands" : ebay.com/bhp/cpu-stand
 
@bwoebi With my ini file
Which just enables opcache with a bunch of options
 
ah ok
 
@LeviMorrison The computer to crash
 
If anyone likes Metal + Sonic the hedgehog and hasn't seen this guy, you're missing out: link, he's awesome
 
2:50 PM
I'd say it's a bad question ^^
 
@tereško my school book is mad
@LeviMorrison It shouldnt be. Its by the University of Cambridge
I think i remember it wrong
 
@HassanAlthaf Possibly.
 
Well which of the either run directly on the processor; interpreted or compiled?
it was a one mark question possibly to avoid anyone scoring full marks
the whole paper was a cake except for that question
 
@Gordon that's really strange, if I try another key it's working...
 
@HassanAlthaf I think that the expected answer was probably "compiled"
 
2:53 PM
OMFG YES!!
 
but you can argue that "neither"
 
Lol, I will sue cambridge
if they dont penalize me with that mark if my answer is wrong
as we never studied anything like that
a book published by them
never spoke about it
 
@bwoebi Run the .php file
Instead of .phpt
That's where I'm seeing the infinite loop
 
@NikiC u look famous
ur fastroute is on Laravel 5
 
lol
 
2:56 PM
@NikiC I am running the php here
 
i am jealous of him for real man
thousands of users probably use it
although i tried the default option cuz i cbf to switch it lol
 
@bwoebi sapi/cli/php -n -d zend_extension=`pwd`/modules/opcache.so -d opcache.enable_cli=1 Zend/tests/jump05.php This is what I'm doing
 
ah, I see
 
I bet @NikiC is overjoyed by the prospect of flood of stupid tickets
(about the fastroute/laravel thing)
 
lol
nah his library is perfect
i use it on composer
 
2:59 PM
@NikiC thanks
 
@tereško I'm totally getting those now.
 
@NikiC @bwoebi Any chance one of you could let somebody know I'm serious about creating an RFC so that I could get RFC karma?
 
Feature requests or 'bug reports' ?
 
@Danack obviously bug reports lol
 
@Trowski try the IRC channel
 

« first day (1678 days earlier)      last day (3270 days later) »