« first day (1684 days earlier)      last day (3250 days later) » 

12:00 AM
@Andrea my god… you had seven PHP seven related RFCs :o!
 
If someone has mulit-byte function overloading turned on, I can't depend on strlen() anymore to return the number of bytes, is that correct?
 
@Trowski That's right, so if anyone turns on the function overloading, just punch them.
 
@Trowski by the way… making a difference between binary and unicode strings leads to having to implement everything twice… once as multibyte, once as binary version…
 
@Danack haha, I was trying to decide if I should code around it or just tell people that the library was incompatible with it.
@bwoebi That's what I suspected. I imagine it would lead to all sorts of problems with people using strlen() to determine if something would fit in a database field, etc. where they really want the byte length but don't understand the difference.
 
@Trowski which is ultimately why we have mb_* and normal bitwise functions
 
12:08 AM
@bwoebi Right, the difference was always clear to me. Personally I've always felt language level strings should always just be byte arrays. Let me determine how to use those bytes.
I hope few people actually use the multi-byte overloading feature. I'd support having it removed.
 
@Trowski they ultimately are. just with special syntax.
@Trowski I personally never saw it used…
 
user895378
12:22 AM
mb_strlen() function overloads might be the single worst idea in the history of PHP. And that's a competitive field.
5
 
12:47 AM
@ircmaxell that's… a nice schedule…
 
Anonymous
1:03 AM
@rdlowrey worse than register globals :D ?
 
Anonymous
good thing I wasn't around during the register globals crissis. I would've been the first to make the blunder :/
 
imho it's the magic quotes. in the mid 2000 8 sites out of 10 had some \"text\" that looked like \\\"this\\\" somewhere
 
@Worf i remember those days
 
@r3wt yo dawg
@r3wt i'm trying to forget em
 
i wrote a wikipedia scraper for a job interview and they just stole my shit and never got back to me
 
1:11 AM
lol
next time add a backdoor
 
lol whoops, wrong window lol
that was supposed to go in skype
 
@samaYo register_globals isn't that bad. There are other issues with it, but isn't that bad.
 
1:25 AM
no way i can get an array rather than a stdclass out from json_decode("{'lol': 'bar'}") correct?
 
@Worf look at the second parameter of json_decode…
 
Anonymous
pass true
 
lol. was looking at the constants xD
 
@Worf the option constants? nah :-P
 
I just saw the word "elephant" and thought a letter was missing. Thanks, PHP. :/
@bwoebi Maybe more...
 
1:29 AM
I'm back, yay.
 
@bwoebi WOW
 
Hello everyone, whats the fastest way to download images? i'm using copy(from,to); to download 10.000 images. but that is taking 30 min for just 1.000
 
@FranciscI.B Use something that permits parallel downloads. copy() is synchronous: it makes the entire app wait until it's done.
@FranciscI.B Have a look into curl_multi_exec.
 
Thx so much for the hint. it's a good idea.
 
1:34 AM
@tereško Someone's slow :)
3 hours ago, by ircmaxell
LOL: http://www.commitstrip.com/en/2015/05/26/php-7-twice-faster-than-php-5/
 
oh
damn
well .. I was watching Smallville
 
Will PHP7 distinguish 32 and 64 bits (float/double)?
American Horror History > *
 
@MarceloCamargo It only has one float type: double-precision (64-bit)
If the distinction between 32-bit and 64-bit floats matters to your application, PHP might not be the right language to use
 
I see.
 
What are you trying to do?
 
1:41 AM
Nothing, It is just a question to get knownledge about the new version. I know (real), (float) and (double) are all synonyms.
 
good morning world muwahhh muwahh
 
@MarceloCamargo You probably shouldn't use (real) or (double), though.
I mean, they do the same thing, but they're not consistent with the type hint names, or the names used in error messages (as of PHP 7)
 
@Andrea, I'm sorry if I was stupid afternoon. Did not mean to belittle anyone or be mean.
 
I don't remember you saying anything to me... at least nothing bad. Did you say something bad to someone else?
 
Ah, no, I was talking about PHP problems, talking about Haskell, but it was not my intention to belittle the job of PHP community, just Sherif that before took me a bit angry with some declarations, but that is solved.
@Andrea, in get_token_all, the first entry of a token node of the received array corresponds to the token number, the second to the token value, but the third is always 1. Why?
Ah, I saw.
 
1:56 AM
@MarceloCamargo Oh, you changed your name. You were Haskell Camargo earlier.
So that's not your real name. Shame.
Also, I'm not an expert on the tokeniser, someone else would know...
 
anyone uses CI ? or they just move to symfony or laravel?
 
eeek
CI
I'd rather remove my eyeball with a dull plastic spork
It would prove to be far less painful.
 
hahaha
Are symfony really that good?
 
2:15 AM
@MarceloCamargo the third is the line number
 
Does somebody know answer me why doesn't single char operators have a specific token name?
 
Single char operaators?
 
I mean, <?php (

will give me "(" not as an array containing token data, but as "string("(")".
 
Oh, that's not an operator.
 
And I didn't find their representations on token list.
 
2:16 AM
Some tokens are just text like that. For example '.' concat.
 
There is no T_MOD, but there is T_MOD_EQUAL.
 
@MarceloCamargo they are literal tokens
 
I see.
 
and somebody thought it was cool to have arrays and strings mixed in the output of token_get_all -.-
3
 
'tis how the parser reads them
whether or not it's cool is debatable
tokenization is such a fragile state in PHP
I remember when there used to be a bug in the parser that allowed you to execute functions inside of strings.
 
2:20 AM
it could be normalized so at least we would have lineno information for these tokens, but changing it is now a BC break.
 
Maybe a RFC could be open to normalize token_get_all.
 
Breathing is a BC break in PHP
 
Ah, that's a break.
 
Just looking at the code is a BC break
 
2:21 AM
Do you belive creating a unityped variation of token_get_all can be good?
 
no, just create a token stream class. Fixing it is impossible now, unless you create another token_get_all_normalized function :)
 
Best way to avoid BC breaks in PHP is to just create a new function ... token_get_really_all
 
Ah, I'll try your code here, a moment...
 
no_really_this_time_I_mean_it_I_will_give_you_all_teh_tokens_I_promise
 
Pseudo-tokens should be added in literal tokens in order to work, in this case.
 
2:23 AM
@Sherif no_really_this_time_I_mean_it_I_will_give_you_all_teh_tokens_I_promise(BUT_FILTE‌​R_T_WHITESPACE_PLEASE_FLAG)
 
That function lies
It's a liar!
 
@MarceloCamargo this solves all your pains gist.github.com/marcioAlmada/…
 
You really deserve a chocolate cookie. ç.ç
I'm must remember to recompile my PHP version. I'm running 5.4 here, oh.
 
@MarceloCamargo so... in the code, you just need to decide what to do with the extracted preprocessor directives, they are just a token stream with the tokens of each preprocessor directive %{ /*blah blah*/ }%
I changed the syntax to %{ }%, but feel free to put it back to %% if you need
 
%{

}% is beautiful enough!
I believe a good implementation to put in would also be direct token translation, allowing direct token override, such as
%{
override T_PAAMAYIM_NEKUDOTAYIM YOUR_TOKEN_HERE
}%
 
2:30 AM
on userland code? all the time you use T_PAAMAYIM_NEKUDOTAYIM from userland side it is inside a string... usually preprocessors won't affects anything inside '' or "" for sake of sanity
@MarceloCamargo I'll do a test runner so we can test the preprocessor like this gist.github.com/marcioAlmada/…
 
Ah, ok!
 
and this sweetjs is quite nice, I'm having fun with it
 
This wasn't supposed to happen, was it?
%= is a token literal, but it is named as T_MOD_EQUAL in zend scanner.
 
is %= already an operator? O_o
PHP has this uncanny ability to use every char sequence under the sun as an operator ^^
 
This is because you didn't see LiveScript!
It has dozens and dozens of operators.
.<<<. Also is an operator, for example. |> >>> <<< <<<< << >> ... and a lot of...
 
2:36 AM
yuck
 
Anonymous
i second that
 
@MarceloCamargo ok, yes, this is supposed to happen
 
you will only get a string if the token is a single char github.com/php/php-src/blob/master/Zend/…
 
Ah, and T_MOD_EQUAL is listed: http://www.nusphere.com/kb/phpmanual/tokens.htm

Maybe it is a parser only feature, all mixed.
 
2:38 AM
@marcio %= is an operator.
 
Ah, I see.
 
@MarceloCamargo here they are github.com/php/php-src/blob/master/Zend/…
 
Ah, this wasn't a core issue. It will not work if you don't put it inside <?php tag, yay.
The tokens listed in this file always return a string.
In the preprocessor, I think it may be useful to implement pseudo representation of that listed tokens on the parser.
 
@MarceloCamargo yes, anything that is a T_INLINE_HTML should just be skipped
@Trowski yes, I totally forgot about it
 
I'll write a normatized token_get_all with pseudo-representation for single char tokens, looking in a hashtable and generating pseudo token names.
Do you remember in which file are the built-in functions like this implemented?
 
2:43 AM
you don't need it, just consider the token name to be the token itself
 
I see.
 
also, the line number of these tokens won't matter for us
 
Tomorrow I'm gonna write the E-BNF specification for the pre-processor grammar.
I believe it can be as powerful as Harbour is.
What is quite easier than Harbour for us is that we don't need to reimplement the scanner.
 
morning
 
Somebody please help me.
0
Q: Where I'm going wrong so that I'm getting blank string in following DOMDocument program?

user2839497I've a following program which replaces the <img> tags present in a HTML strings by some code. But I'm not understanding why I'm getting blank string after completing the string processing. I'm not able to point out the mistake even after deep debugging, so asking for someone's help. If you look...

 
Morning, java.lang.NullPointerException.
 
@MarceloCamargo cool, ping me tomorrow
leaving now, gn :)
 
@marcio later
 
See you!
 
how to get source code of dynamic page with takes some parameter and displays data
 
2:52 AM
Do you want to get the source of all the file?
 
@santosh it would be same as static page ..
 
suppose i have url like this allwebdevhelp.com/php/help-tutorials.php?i=56031 for this i am trying like this $file = file_get_contents($url); but not getting
 
You can't. It would be a security hole if it were possible.
 
Warning: file_get_contents(www.allwebdevhelp.com/php/help-tutorials.php?i=56031): failed to open stream
 
You can get the static representation, not the dynamic.
If you want some specific element of the page, you can use YQL to achieve that.
 
2:55 AM
but what about wordpress it also passes some parameter and retrives data but it is possible trough the file_get_contents
 
 
2 hours later…
4:34 AM
Hi all
Good Morning
Someone please provide me some help in my issue.
2
Q: Getting blank string in following DOMDocument program

user2839497I've a following program which replaces the <img> tags present in a HTML strings by some code. But I'm not understanding why I'm getting blank string after completing the string processing. I'm not able to point out the mistake even after deep debugging, so asking for someone's help. If you look...

 
@John I guess I don't understand what are you trying to achieve
 
5:07 AM
12 hours ago, by samaYo
I don't know, for the most part I just type as many letter combinations of as possible while pressing F5 until something works :P
 
5:39 AM
makes sense
 
morning
 
5:59 AM
'nin
 
6:20 AM
Morning
 
6:43 AM
o/
Any1 here used ssep?
 
7:01 AM
Mogguh
 
huh?
 
morn
Developer Accused Of Unreadable Code Refuses To Comment
4
 
:P
 
@SergeyTelshevsky xD the title is a wild ride.
 
7:18 AM
@Trowski If you want to bulletproof your code against mbstring function overloading, call mb_internal_encoding("8bit") before your code, and restore it to the old value afterwards. I was foolish enough to use function overloading as standard practice for quite a while, and that trick was my catch-all solution to making third-party code compatible.
 
ssep pgd not exist...
 
7:35 AM
Made my day: FOAAS
3
 
7:52 AM
@Gordon but is there a PHP wrapper for the API? :-(
 
8:31 AM
posted on May 27, 2015 by kbironneau

/* by Dédé */

 
8:55 AM
@Ocramius have you thought about generating custom hydrators for each entity in Doctrine? That could speed up hydrating process a lot, I think. Same could be done for persisters probably
 
@nikita2206 yes, I thought about it, but I have no time to work on it
 
ThW
morning
 
yeah time is a bitch
 
@nikita2206 if I don't get any consulting gig after july, then I'm gonna work 24/7 on doctrine2 for a few months
I mainly want to get github.com/Ocramius/ChangeSet finished
 
@Ocramius you even have a reverter, nice
I'm working on a project that is very similar to hydrating (mainly data marshaling), with code generation. If you ever go that route I could help you with that and that would be nice to gain some milliseconds for Doctrine
 
9:07 AM
 
@nikita2206 yeah, the idea is that the reverter would just revert in-memory state. Not much, but still, we'd have real transactions on managed state
@nikita2206 if you want to help, come up with more scenarios
 
hello guys
i am looking to call the check value function for array_walk_recursive, array_walk_recursive($inputs,'check_value');
my problem is that this function is accessed through it's object
how can i do that ?
$this->check_value !!!
 
@samaYo I figured out my weird google issue
Mighty @Ocramius, can you tell what is better for entity configuration: Annotations or XML ? You expressed your hate towards yml
:D
@samaYo fkn application aint stateless ^^ the current "product category" is saved in the session and the links on the site don't add the get parameter for the category again, so google must be running concurrent processes with its crawler or smth.
 
9:22 AM
@MarcelBurkhard annotations for private packages, XML for public packages
 
moin
 
moin
 
moin
 
> Server invites you to consider the truly monumental amount of fucks it couldn't give about your request.
 
@Ocramius what do you mean?
 
@r3wt What a jock strap.
 
ha, yep
 
@Jimbo Fine Scottish gentleman. Good friend of mine.
 
 
9:47 AM
lol
 
mornin
What can stop code execution like exit() die()?
 
@VeeeneX Fatal errors I think
 
I've used try and catch it didn't output anything
 
10:02 AM
Are you using that display_errors and error_reporting configured to show errors?
 
Actual code @malukenho pastie.org/10209756
I'm using error_reporting(E_ALL);
I don't know if I'm high or what... :D
 
and init_set('display_errors', 1); ?
you want to use both
 
$this->Provider is instance of Dice
Call to undefined function init_set()
Huh?
Ini_set :D
Typo ^^
No errors
And line 17 is not executed
self::getNamespace works and continues it stops after $this->Provider->create()
Can I somehow track what JIT done?
I think I won't solve it in code
 
@VeeeneX can you var_dump($this->Provider) to make sure if it's setted
?
 
Yep, it's object
 
10:09 AM
Can I ask why you're using Dice?
And not something like Auryn?
 
But it has thrown ( ! ) Warning: Cannot modify header information - headers already sent by
@Jimbo Auryn is quite big
 
@Ve
 
@malukenho Yes ?
 
Hey, I have a problem with a explode. I have product codes and qty in my database like this: code,qty|code2,qty2
Now when I try to seperate these I will have a problem. http://pastebin.com/qSQ9QNW9
 
But interesting is a call stack:
 
10:12 AM
@VeeeneX You're kidding? It's just a bit of code, you don't mean bytes-wise do you?
 
`0.0019 141376 {main}( ) ..\index.php:0
2 0.1137 1142408 Aurora\App->run( ) ..\index.php:41
3 0.1231 1145832 Dice\Dice->create( ) ..\App.php:115
4 0.1479 1301864 Dice\Dice->Dice\{closure}( ) ..\Dice.php:43
5 0.1829 1329088 invokeArgs ( ) ..\Dice.php:39
6 0.1829 1329272 App\Front\Controller\AjaxController->onConstruct( ) ..\Dice.php:39
7 0.1830 1329360 App\Front\Controller\AjaxController->after( ) ..\AjaxController.php:29
8 0.1831 1329448 Aurora\Http\Response->send( ) ..\AjaxController.php:37
9 0.1836 1329856 header ( ) ..\Response.php:205`
@Arto Show us input
@Jimbo No I'm not kidding, but what about speed?
 
521010260,2|521010270,1
array0 521010270
array1 1
array2 nothing
 
@VeeeneX Have you timed them? Auryn caches reflections. I'm willing to bet any differences are absolutely negligible.
 
@Jimbo Ok, I will use it ;)
 
@VeeeneX Don't just use it... give it a try and compare :P
 
10:20 AM
:D at your command ! ;)
var dump is useful ;)
My problem solved ;)
 
hmm, I still don´t get how to use the last two rows.
Oh, I did got it. I am stupid. Thanks!
 
10:37 AM
@Arto You are welcome
 
@Ocramius write one ;)
 
@rdlowrey Can we get Auryn to 1.0 yet? PHP-DI is really making headway and I want Auryn up there
 
10:53 AM
DI? why why why
 
@r3wt Wut?
 
@Jimbo Wut Wut?
 
mornin'
 
mogguh
 
posted on May 27, 2015 by kbironneau

/* by zsirbufe */

3
 
11:28 AM
@Ocramius thank you
 
@r3wt Wut wut, in the butt? nsfw (which should be pretty damn obvious)
 
Anonymous
nsf(human beings)
 
11:44 AM
@Ocramius What do you use to make slides?
 
@Danack A big hill, a shitload of bin bags and a huge bottle of washing up liquid
 
Anonymous
12:07 PM
this should make it to php7 wiki.php.net/rfc/taint
 
@samaYo I hate ini setting "security"
 
Anonymous
better than nothing :)
 
Better than nothing can lead to a lot of crap
 
@samaYo YeahnO. magic quotes?
 
@samaYo No, for security, a false sense of security is probably worse than nothing. marc.info/?l=php-internals&m=119542202031512&w=2
The whole thread is probably worth reading - the fact that it slows code down significantly is also not good.
 
Anonymous
12:13 PM
@PeeHaa I wasn't around during that era. Also php_expose off is an ini setting which I know you use for security reasons :)
 
The only thing that does is remove a header
 
Anonymous
why else would it be there if not for that purpose o.O
 
To prevent simple scans by skiddies from picking it up
However it does NOTHING to enhance security in any way
 
skiddies, heh
 
12:19 PM
@r3wt You said something about DI
 
I know, I just liked the abbr :P
 
:-)
 
BTW, how do you feel about logic in your templates?
 
Depends what kind of logic...
 
@Fabor The only "logic" I have is foreach ($this->recordset as $record) {
And perhaps if ($this->user->isLoggedIn())
 
12:21 PM
Yeah, I was going to say that ^
 
What about pre-populating forms
 
Anonymous
Is there a phpMyAdmin version that is compatible with php 5.6.8?
 
@Fabor If that data is not tied to anything, then something like {{ if (records is empty) { '<td colspan="5">You need to add a record first</td>' } }}
 
For my CMS is use $this->formBuilder->render() because every form is the same (it just iterates through the print field). FOr the fronend I just use $this->form['field']->getFoo()
 
@Jimbo Furry. I tried out mustache php and I am now converting it all to Twig. Logicless just didn't work for me.
I think it can work but it requires more planning than I was able to do.
 
12:23 PM
I don't understand mustache :P
Nor twig btw :)
 
You use your own I presume?
 
ob_start();
$this->theme->load($template);
return ob_get_contents();
 
Don't say "I use PHP" - there's a great post somewhere saying that PHP isn't enough any more
 
^ my templating engine:)
And a magic getter on top of that because I like magic
/me ducks for cover
 
lol
 
Anonymous
12:30 PM
@Fabor check out @PeeHaa's commentar and pitchblade
 
I've used it
 
It's ob_get_clean btw. I always mess those up
@samaYo Also tnx for reminding me I really need to pick up commentar again soon. Everytime I need a commenting system I think "if only somebody create a decent commenting system" and then I realize I started on one myself :(
 
Anonymous
I have stolen learned a lot by tinkering around those repo. I even copy pasted the docblocks sometimes and forget to change it gist.github.com/samayo/6f8a9d924137c45259e7 @Fabor
 
> PeeOverflow.
 
Anonymous
@PeeHaa you really should do that.
 
12:33 PM
Very mature @Jimbo!
;-)
 
Yeah I have stolen a lot of @PeeHaa's work too.
 
@samaYo lol
 
Anonymous
@Fabor and may the peehaa forgive us for our sins
 
Anonymous
/ me repents
 
Heck @PeeHaa has even helped me remove his own stuff :P
 
12:37 PM
:-)
 
:D
 
twig <3
@PeeHaa twig uses extract to explode an multi dimensional array into variables like ['foo'=>1] would result in $foo being created. so inside of twig, anything in we would reference it like {{foo}} and the value of $foo would be printed
 
Is there a way of getting an images src attribute value with $_POST? Like can I give multiple images a name attribute like so, name = 'section_photos[]' and from there get the value of the src?
 
12:53 PM
@r3wt Yeah or you could just like... idunno... print a variable :P
 
@PeeHaa InstaPee?
 
:D
 
hi all
 
YAY
 
12:54 PM
@rdlowrey /me happy
 
1 message moved to bin
 
my insert query is like this i am getting lastaddressid but i can not insert that last insert id in for loop it is automatically take last inserted id for all records of addressgroup
 
Please use a pastie service instead of dumping a wall of code in here
@rdlowrey Pfff alpha wake me up in two years :P
 
user895378
:)
 
@PeeHaa twig is about separating the view from the business logic. using it has really increased my agility. you should give it a try maybe. or not.
 
12:55 PM
i have problem with inserting last id in for loop
 
@r3wt My engine does the same thing
 
@PeeHaa LOL. wait until someone injects that shit
i built my own templating system one time too
infinite recursion
 
\o/ rdlowrey
 

« first day (1684 days earlier)      last day (3250 days later) »