« first day (805 days earlier)      last day (4143 days later) » 

8:00 AM
Which would be function array_access($arr, $key){return $arr[$key]} and then your code would become array_access(func(), $n)
@Saber I hope that helps
@AnkurSaxena Good morning
 
@Jasper thanks. let me work on it. brb
 
Hey any one here can help me with my problem?
 
posted on December 29, 2012 by Stuart Herbert

I’ve mixed feelings about the PSR standards to date. PSR-0 has standardised autoloading in a practical way. Sure, it does have an evil design flaw (different classes can map to the same file on disk), but in practice it’s not a problem that happens. I’d have personally liked to have seen PSR-1 go further, and address method naming in more detail (in particular, that method names should start

 
8:16 AM
Question: Is an url validated via. filter_var($url, FILTER_VALIDATE_URL) and also a regex like this daringfireball.net/2010/07/improved_regex_for_matching_urls something I should be able to trust not to inject html my page?
Additionally, would parsing such an url and then sanitizing (via. htmlspecialchars()) the portions after the domain and protocol be a bad idea?
 
@Hamster: Can you write or even just read regexes?
 
Quick PHP Doc reference for us devs starting out: 1) make a hosts file entry "php php.net's ip" 2) now if you want documentation for trim, go to "php/trim" in your browser. 3) spread this

I am sure pros here already know this stuff. I am just putting it here for others :)
 
@Jasper I can, but not too well.
That is, I rely on a reference to do it.
 
@Dhwani Basically your question reads like "I want this done, please do it for me". I know it may not be intended as such, but to stand a better chance of getting an answer from this site, it's best if you rewrite your question to: I did this "a" and I expected this "b" but got this "c", what can I change about "a" to get it to produce "b"?
 
But I don't consider myself versed on html injections.
 
8:23 AM
@Jasper is this how can i call it
$classroom = $this->array_access(classusers($classID), 1);
 
@Saber yes
@Prasanth I strongly, strongly disagree with that. Instead of having your workflow break if php's ip changes, you should just be able to write "php.net/trim". It's only four extra characters
@Hamster The regex you are using is quite a lot more complex than you want it to be. I mean, it follows the spec even where you usually don't want it to or need it to. Such a complex regex makes it hard to talk about things like that
 
@Jasper true. but, it totally depends on what is more frequent: php.net's ip changing or referring to php doc. personally i am good with updating php.net's ip once in a while.
 
@Jasper it gives an error " Call to undefined function"
if i does this
$classuser = $this->array_access(($this->classusers($classID)), 1);
it gives a undefined offset.
im pretty sure im calling the right function.
 
@Saber where did you define array_access?
 
this is how it looks like pastebin.com/UYeiNqZL
 
8:33 AM
@Jasper The issue for me is whether to trust it or not, though.
 
@Prasanth well, I'm fine with you using that, but not fine with saying it's a good thing to do for those new to php as for them it might just break and they might not know how to fix it. Besides, you probably couldn't save a single hour in your whole life with that trick unless you are a truly terrible typer
 
you are right.
 
@Saber You are defining an array that has the keys "user" and "class" and then try to access the element at key 1, which it doesn't have...
 
return array('user' => $userinfo, 'class' => $classroom );
user and class are array objects.

i want to store them on the different variable separately
like : $classusers will store the user
$classroom will store class
 
8:45 AM
alright, that's all nice and dandy, but it makes no difference at all
if you do array('class' => $someVar) then you should do array_access(func(), 'class'. If you want to do array_access(func(), 1) you should do array(1 => $someVar) or array($someOtherVar, $someVar) in the first place
 
Hello every one, Please suggest me a way to implement the odata services using php server. Is it possible? check this question stackoverflow.com/questions/14079900/…
 
@Ajmal Questions that ask for a suggestion (for which library to use) don't really belong on stack overflow
 
@Jasper, I have edited my question. can u please help me where I am wrong...
 
@Ajmal you need to show what have you tried and where you got stuck
@ShaquinTrifonoff lol About 188,000 results (0.18 seconds)
 
8:57 AM
@Jasper, Here is my question, and things I have done so far... stackoverflow.com/questions/14075485/…
 
hi
 
@ShaquinTrifonoff please suggest me
 
@Jasper lol. sorry my bad. :3
thanks! :D
 
is there any way to like an mp3 link to facebook ?
 
@Preethy huhh..
 
9:00 AM
in php
?
 
@Preethy again huhhh
 
@Dhwani You should also add what you did in HTML, additionally, theparagraph at the top could also use a rewrite, as it is really hard to understand what you are saying in it
 
@BrijKishorRajput ahhh lol...dont ask question like that if you dont want to get bunch of down vote
 
@NullPointer Who?
 
@Jasper i dont understand what about you asking please specify ?
yey now 14 follower
 
9:15 AM
@NullPointer just that I couldn't make sense of your comment directed towards a guy called Brij who I haven't ever seen around here, but it's nothing important, really
 
@Jasper i saw question he asked .. and replied for that question also he is in room
 
@NullPointer fair enough
 
@Jasper so jasper how you doing
 
I'm doing great. I'm currently writing the first application in my own framework and it's always a joy to write in something that was made for you to like. How about you, how are you doing?
 
its cool.... i am just reading .. .. VB (and its ridiculous )
@MadaraUchiha hola
 
9:21 AM
Yo
 
The downside is of course that it also means that you run into things that you need for your application and you can no longer holding off on adding the functionality to your framework as otherwise you simply get stuck...
@NullPointer VB? Haven't done any in a long time and my memories of it aren't fond ones. Anything in particular ridiculous enough to be worth mentioning?
 
@MadaraUchiha how its possible ?
 
@NullPointer Dunno
 
@Jasper i am reading to score marks not for project ... :P
@MadaraUchiha looks like chat room love your this image ....:P
 
@NullPointer My thoughts are with you :P
 
9:34 AM
@NullPointer My image is awesome. Even chat knows that.
4
 
9:49 AM
is there
 
10:35 AM
@ManishNagar congress ...:P
@Jack hiya
how total view .... work on website .. should i do increment on page load every time or .. another approach like detect ip ... and only increment once .. for one ip.. also my site doesnot provide account for users
 
10:59 AM
ola! @NullPointer
That sounds like an interesting question ... NOT
0
Q: Parse error: syntax error, unexpected T_PRINT

Jesper HaraldssonI have searched and can not find anything on T_PRINT syntax errors. So here it goes, I don't see how this is "unexpected". It is referring to the print "Your Staff Application has been posted" etc. line. <?php session_start(); include "globals.php"; if($_POST['app']) { $db->query("INSERT...

Talking about strange ...
 
@Jack looks like really strange
 
Yeah, there's no real parse error as can be seen by humans.
 
@NullPointer u best increase page load on every time, so as long as u not have visitors you can visitors, when u have visitors they wait and u cannot
 
@Jasper sorry i can not understand .. what you want to say ...
@Jack and i got new way to find parse error ... but how he has got those non breaking space in program ..
 
11:14 AM
@NullPointer I was just responding to your message with an equally intelligible response that had at least as much problems with the English as yours, that was all
Or were you doing something other than messing around about the way poor questions are asked, I certainly thought you were :P
 
@Jasper ahh my last message was totally incomprehensible
let me correct ..
 
user1125394
bye H+12
 
@NullPointer Not sure how OP ended up with that file.
 
i want to know how total view works for website ... i want to show total view of website .. and for that what should i do ?...should i detect ip and increment visitor per ip ?... or increment view per page load ... ? or there is any other way to go ?
@ShaquinTrifonoff later..
 
user1125394
11:27 AM
uh?
 
@NullPointer Are you actually asking that question yourself? It sounds like a noob way of asking =p
THANKS! that solved it :D — Jesper Haraldsson 29 secs ago
@NullPointer Amazing .. who would have guessed haha
 
@Jack i know its silly but .. have to ask .. if all are incrementing by per page load than i dont want to do that ip stuff ..
@Jack its unbelievable ....
had to +1
 
 
1 hour later…
user1125394
12:52 PM
 
word
 
user1125394
my work pc..
 
user1125394
serious, I just let the chat opened for a week
 
/me just issued a PR against Symfony (my first) github.com/symfony/symfony/pull/6510
 
@ircmaxell hiya
@cyril woo
 
user1125394
1:09 PM
 
user1125394
stop pinging me now
 
awww snap
got them digits
 
NullPointer breaking the illusion since forever
 
1:38 PM
guys
can anyone help me with gitolite setup?
 
@MadaraUchiha is awesome beyond doubt. And, will be so for many generations to come. /me takes a bow. :)
2
 
1:58 PM
MUAHAHAHAHAHAHAHAHAHAHAHA
$func = new PHPPHP\Engine\FunctionData($executor, PHPPHP\Engine\FunctionData::IS_INTERNAL);
$func->callback = 'strlen';
$executor->addFunction('strlen', $func);
 
user1125394
should call it PHPHP
 
eih
 
hello
 
whats up
 
@ircmaxell you just gave the PHP backronym a completely new dimension
 
2:15 PM
@ircmaxell lol
Where'd you find that?
 
Guys, is there some easy way in PHP to export assoc. array where in result key will be variable and keys value, will be value of a variable?
 
@Eugene compact()?
 
@Eugene I don't understand what you want.
Example of input and required output please.
 
generally agree with @MadaraUchiha, this was a very remote guess :)
 
@igorw extract
 
2:21 PM
@Eugene ... What do you have and what do you want to have?
 
@Eugene ok, so I did understand the essence of what you were trying to do, just the wrong way round :D
 
@igorw yep :)
 
compact and extract are language constructs though afaik; and not functions.
 
@igorw I don't think they're language constructs actually ... try removing the parentheses ;-)
 
@Jack I don't think that's the definition of a language construct ;-) empty() and isset() are also lang constructs and they require parens
 
2:27 PM
@igorw That's true I guess .. but yeah, they're not language constructs :)
PHP actually performs a function call
 
@Jack you're right. :)
 
Woot! got function calls and definitions working
Now, to commit this and then push it to github
 
@ircmaxell whatcha working on?
 
I flaged it with one I found
 
2:43 PM
@ircmaxell oh my, what .. have .. you .. done? lol!
 
@Eugene What's the dupe..?
@ircmaxell THE HORROR! THE HORROR!!
 
@ircmaxell did you commit the vendor dir intentionally?
 
@igorw No, but it's ok...
 
@ircmaxell why there is no .gitmodules that should add reference to nikic lib?
 
@Eugene composer... I'll nuke the vendor directory at some point...
 
2:46 PM
drop the php-nuke :)
 
@NikiC: here's what I was working on: github.com/ircmaxell/PHPPHP
 
@JaredFarrish it makes a nice wallpaper when printed out.
good mornings :)
 
Now, all I need to do is to get this PHPPHP implmenetation compiled with HipHop, and we have a self-hosting PHP impl (I am crazy, I know)
3
 
3:08 PM
@ircmaxell Somebody! sedate him!
 
0
Q: PHP PDO User authentication - Using bcrypt

RaGe10940I am basing my bcrypt creating off of this site I have made some changes to it though so this is my version of the code : My version of bcrypt I have started working on my login form and I have come the general understanding that to check a users credentials you must : recreate the bcrypt com...

> My version of bcrypt
o.0
 
although it isn't too bad...
except that it'll take like 5 minutes to hash a password (with the cost paramter of 17 the OP used)
 
Yeah I saw that cost param ... that will DOS your server in no-time ;-)
The salt of 10000 chars was also a nice addition.
 
@Jack lol....10000 really ?
 
3:16 PM
Hey, you know what they say ... size matters!
 
3:41 PM
@ircmaxell can you add a license file?
 
Good point.
Done
 
danke :)
 
I would have done WTFPL, but as it may prove useful in the future, MIT is more appropriate...
 
@ircmaxell first PR done
 
can you also ignore the composer.lock file? (so that install will work)?
 
3:53 PM
install should work fine with composer.lock
 
Ok, I was under the impression it wouldn't... Closing now
 
if there is a lock file present, install will use the deps from the lock file
it just means the vendors are locked to those specific versions
thanks!
 
done! And thank you!
 
Morning allz
 
4:01 PM
Great, so can start setting up bugs.phpphp.net as well? ;-)
 
lol
 
Complements of the Season
 
HAHAHA
 
Happy New year in Advance ...
 
Same to you @Baba.
 
@PeeHaa .... surprised you can still use the keyboard .. after all the beer this season
How are you doing ?
 
@Baba I just woke up :| So I'm still a bit sleepy. Doing fine otherwise though
 
@PeeHaa cool ...
Writing the worst code of my life
 
@Baba What does it do?
 
4:08 PM
trying to find errors in someone else garbage and fix it
@PeeHaa Its basically and Importation and bulk management system
@PeeHaa what are you doing lately
 
@Baba Great. I had to do that a lot too on the job :(
@Baba I have bravely reinstalled my server a couple of days ago
Or actually I'm still busy.
 
lol sometime you wonder what language they are writing ...
why the re installation ... any update or issue ?
 
@Baba Or whether they were drunk or just plain stupid :P
@Baba The server has been online for a pretty long time and it was time for some heavy updating. At the same time I moved to another host (cheaper and moar performance)
 
@PeeHaa i saw one code with about 145 different if else ... in a way i wonder how their brain was able to process such information
@PeeHaa i like the word cheaper
am using Rackspace now ... not that cheap ...
 
@Baba Is it a VPS?
 
4:16 PM
@Jack crap, phpphp.net is actually taken :O
I guess php.php.net it will have to be then
 
@PeeHaa combined ....
VPS + Dedicated Server + Dedicated Firewall
 
@Baba Nice packet
 
Thank You ....
it would be nice to find another cheaper reliable provider
@PeeHaa one moment BRB
 
@Baba It's pretty hard to choose a good host
@Baba kk
 
@igorw Hold on. phpphp.net is taken by .... THE CHINESE! .. it expires in July 2013 though - these guys to be exact: 85222.tradebig.com
 
user1125394
4:26 PM
2013 is prime I guess?
 
Buy wholesale products with high quality directly from reliable Chinese wholesale Supplier on International Online Shop WellSupplier.
seems legit :P
 
user1125394
happy new 0x7dd
 
It's not 11111011101 yet
 
user1125394
oh I suck at math, forgot that 2013 is obviously a factor of 3
 
user1125394
actually it will be year 11 in Maya calendar
 
user1125394
4:33 PM
1x2012 + 1
 
@cyril What do the Maya's know? :)
 
jessus ... this guy is using md hash for password and on the top not escaping post request ...
 
It's also attempts to set the permission of some folder to 777
 
user1125394
➁k➀➂ well sorry but unicodes didn't provide the 0
 
4:48 PM
Hi guys, is anyone able to help with this issue? stackoverflow.com/q/14011625
 
@Camrada Your code somewhat hurts my eyes
 
yeah, have fiddled and tweaked it a lot over the last week or so trying to nail this problem...
 
That's no excuse of cramming all that stuff on single lines ;)
 
user1125394
 
user1125394
for a short presentation
 
4:58 PM
@Jasper are you here?
Hey everyone
 
Hey @DanielMinett
 
How ya doing @PeeHaa?
 
@DanielMinett I'm fine. How are you today?
 
Not too bad thanks. Some shit got into my server yesterday which isn't the first time and is really starting to get annoying @PeeHaa
 
@DanielMinett Let me guess: you are hosting some WP stuff?
 
5:02 PM
@PeeHaa WP>
WP?*
 
Word press
 
@PeeHaa - tidied the code a little, does it help at all?
 
@PeeHaa I have word press but they are using XSS through a vuln in VB4
 
@DanielMinett What is VB. That forum softare thingy?
 
@PeeHaa
Yeah
brb
 
5:04 PM
@Camrada It does help. I cannot help you with it, but I'm sure other would be more able to help you know
@DanielMinett kk
 
Many thanks :)
 
@PeeHaa There is a vuln in VB4 itself and their techs are useless. I'm pointing out the file that has a vuln and they can't find one. Most annoying
 
@DanielMinett Can't you patch it up yourself?
 
@Peehaa no I suck with PHP been a long time since I worked with it
Years
I'm only just remembering the basics
 
@DanielMinett Is the culprit file on github?
 
5:11 PM
Nah, did you want to have a look at the file:/
?
 
@DanielMinett When it is not a too big wall of code
 
Let me check
 
kk
 
3693 lines
So a nice size @PeeHaa
 
:P
 
5:14 PM
Did you wanna take a look? I guess not :P;
 
@ircmaxell Can you give me repo access the that?
 
@NikiC Done
 
@DanielMinett I'm not really feeling like plowing through all that no thank you :D
 
@ircmaxell Thx
 
:-D
 
5:16 PM
@ircmaxell Will be fun to get that to work
 
haha I don't blame ya. I'm paying VB techs to do that anyway but they are useless. I'll just keep bugging them :P @PeeHaa
 
@NikiC A fair bit of it works already. There's some really non-optimal design in there, but I wanted to get it working first
for example, the variable section really needs work
 
@PeeHaa did you fancy looking at a few arrays for me?
I'm trying to figure out whats what lol
 
@DanielMinett Shoot
 
5:17 PM
@ircmaxell I wonder how hard it would be to get it to run at least ~50% of the testsuite
 
@Peehaa
 
@NikiC Well, the Zend test suite at least...
 
@ircmaxell that tests the zend engine?
 
yup
meaning things like extensions wouldn't be tested at all
even the standard ones...
(for now at least)
 
@ircmaxell Making it fully pass will be hard I think, but getting a good percentage...
 
5:19 PM
fully, sure. But I think we could make a good dent...
 
@DanielMinett k. And what's the question?
 
Zend/tests, tests/lang are the important ones
 
exactly
 
Obv this is from VB4, I am trying to find info to get the user ID
@PeeHaa
 
One concept I'd love to explore is to try to get it to compile with HipHop, and then we'd have a self-hosted implementation that may actually perform within reason to the C implementation (and if we're really lucky, better in certain operations)...
 
5:23 PM
@PeeHaa I just put this in a blank file and uploaded it to get the arrays <?php session_start(); var_dump($_SESSION) ?>
 
@DanielMinett There is no the user id in there AFAICT. I suspect there are user ids of users in the chat both typing and idling (is this a word?), but I don't see the id of the user currently loggeed in
 
@ircmaxell uhm, i don't think so
hiphop is slow
really slow
 
@NikiC: one thing in my plans for the short term is to refactor the opcode parsing, so opcodes handle their own parsing (by registering themselves with the parser)... To cut down on duplication...
@NikiC production code? or the compiling process?
 
@PeeHaa
I made the mistake of putting it in a random folder
 
i.e. hiphop is faster than zend, but it's not some big improvement. Maybe 2x, but I wouldn't bet on much more
 
5:26 PM
@NikiC if we can get it to even be 50% as fast as zend (twice as slow), then I'd be happy...
 
In added the line to forum.php quick and got this: http://pastebin.com/GZDL7N6q

I don't think there is much difference? @PeeHaa
 
I don't see much difference no
 
@PeeHaa Would it be possible to change $_SESSION to a different term and try for userid?
 
@ircmaxell I don't think that's realistic
 
@DanielMinett Well $_SESSION is the session superglobal, but considering I have no idea what is going on in the code I cannot be sure they aren;t doing any funky things in there
 
5:30 PM
@NikiC If you never aim high, you'll always hit your mark ;-)
 
Hmmm
I have VB @PeeHaa
 
@ircmaxell Don't tell me about aiming high
 
:-D
 
I aim high, I just really suck at aiming :P
Was never good at ball sports, in particular ^^
 
@PeeHaa is there a way you would suggest to get userids from a page?
I'm assuming some kind of GET method
 
lol
So I have 2 concepts for this. One is obviously to try to get it to be self-hosting with decent performance. The other is to use it as a teaching platform...
 
facepalm
@PeeHaa Thanks, I don't know how I didn't find that yesterday. Thats just embarrassing
 
It happens :)
 
@ircmaxell Btw, don't you think that the Parser component you have right now should rather be a Compiler?
At least that's how PHP calls it :)
 
Not really. The parser in PHP generates the opcodes
the compile then post-processes them
no?
 
5:40 PM
the parser calls the compiler
the compiler emits the opcodes
 
right, but the parser calls the compiler with the generated opcodes... (or so I thought based on the lexer)
 
the opcodes are created in zend_compile.*
 
Ahhhh
I see now.
 
@PeeHaa Does not work :(
 
the compiler just directly calls the functions in that file
(rather than first creating the ast and compiling that in a separate step)
 
5:42 PM
The parser generates "meta opcode information", which aren't really opcodes, but has the data needed to generate them (opcode type, etc)
 
yes
the parser uses znodes
 
so how would you suggest we structure this? Execute directly off the AST?
 
no
like you did it :D
I just wouldn't call that the parser, but rather the compiler :D
 
@DanielMinett I'm pretty sure there is something in here: google.com/…
 
Ok, I'm happy to rename it...
 
5:43 PM
this is just me terminology bikeshedding :D
 
No, I picked parser because I always had in my head that compiling was a step performed on opcodes rather than creating them
but sounds good to me. Then we can move the "parser" into the actual Parser class (getting it out of the test.php file)
 
Lets have a look
 
@ircmaxell won't have much time for this though in the next few days. I promised clint that I'd help out with the accessors and we want to try to get them into 5.5
though I'm a bit skeptical about that
there are some hard nuts to crack
 
Actually, I wonder... Executing directly off the AST would have its advantages... Have a pre-compile step that traverses the AST to parse definitions out of it (so function defintiions happen properly)...
@NikiC No problem at all. I've got lots of ideas to run with anyway...
 
(and that is even assuming that static accessors won't be supported)
@ircmaxell Executing directly off the AST will be unpractical in the long run
especially with more complex stuff
 
5:46 PM
True, as it would need to "recompile" for every call...
 
I mean, handling an IF can be already hard enough, now thing about exceptions and finally and stuff :D
it's good to have it separated
and also provides a structure that is more suitable for optimization
 
Yes. But handling an IF would actually be easier, since you don't have all those Jump instructions to worry about
as speaking of optimizations, ifs currently use noOp markers. That can be a post-compile optimization to remove them (I needed them to reduce the complexity of the jump operator insertion)...
 
yeah that if code looks ugly
@ircmaxell and also resolve the oplines to their offsets ;)
 
@NikiC Well, it merges the arrays down. So at the time of writing the opline, it doesn't know the offset. But that would be what the post-compile step does...
 
@ircmaxell yeah, I mean post compile ;)
 
5:52 PM
exactly
 
PHP does that too
Or something along these lines
 
right
 
It's called pass_two :)
 
One thought I had would be to use this to process a library from its bootstrap phase, generating a single optimized opcode structure for that library. Then compiling that down to PHP opcodes (via a custom zend extension). Then injecting that into APC...
 
yeah, that's something we already discussed some time ago
that would require though that this sticks strictly to PHP's opcodes
 
5:53 PM
right, this just lets us write those optimizations in PHP where it's higher level
@NikiC Not really. Just in a generatable format to PHP's opcodes
for example, function calls require 2 opcodes in C, but one in my implementation. We could compile my one down to the 2 needed...
 
@ircmaxell I mean mainly preserving the opcodes, their operands and their exact meaning :)
 
Right, preserving them at least to the point where there's no ambiguity...
(meaning they don't need to be exactly one to one...
 

« first day (805 days earlier)      last day (4143 days later) »