« first day (1645 days earlier)      last day (3297 days later) » 

12:28 AM
Bah, I really want enums right now.
 
@LeviMorrison i added class entry to CG(class_table) it's showing when i var_dump get_declared_classes() but when i call it. i get fatal error undefined class. maybe it need to be added somewhere else as well
 
Are you adding classes at runtime?
If so, how?
Can you emit an opcode for declaring a class?
 
no i didn't i just added class entry to _zend_compiler_globals there is class_table where defined classes are stored there. i access it via CG(class_table)
and did zend_hash_update(CG(class_tables), class_name, sizeof(class_name), &new_class_entry, sizeof(zend_class_entry *), NULL);
but it didn't work it's showing in get_declared_classes but when i try to instantiate it i get a fatal error
 
What are you actually trying to do? Why do you need to register a ZEND_USER_CLASS?
 
internal classes can't be registered at runtime can they ?
 
12:40 AM
Why can't you register the internal class at compile time?
You still haven't said what you are trying to do.
 
i'm embeding Mono C Api to interface .NET assemblies with php
i don't want to use $dd = $asm->createInstance("System.Windows.Forms.Form") instead i want to use it easily $form = new Form();
so i have to declare the requested class at runtime and bind it with mono
only if it name matches one of the assembly namespaces
i want something simple just declare class Form extends Mono\Object {} and that's it
(with the namespace)
i've currently supported different versions of CLRs, multiple appdomains, events it's really fun. i developed a snake game and a painter in win forms with PHP :)
@LeviMorrison if you're interested in emitting OpCodes, well you have more experience than me this might give you a clue github.com/krakjoe/uopz/blob/master/uopz.c i'm still trying to understand it.
 
 
1 hour later…
2:22 AM
@CodingInsane Where are you hooking into the Engine at for that?
 
2:38 AM
um .... how exactly do prepared statements prevent injections, again? Exactly - they dont. At all. — specializt 1 hour ago
2
@LeviMorrison ohi! :)
 
ohi
Seems it's just the two of us this Friday night, @Ja͢ck.
 
It does seem to be the case.
 
That specializt though…
He seems to be knowledgeable about security!
 
i've found duplicate class names one declared in userland and on from my ext in get_declared_classes() i think zend_inline_hash_func is getting a wrong hash for me that's why the class is not found
 
Is he now
Their sql answers are kind of disappointing on the subject.
 
2:45 AM
Total score for SQL: 0
lol
@CodingInsane How are you hooking into the engine to intercept the class declaration stuff?
 
:)
 
still didn't thought of you to do it. but this could be easy either declare all the classes in the loaded assembly (not so good). or register an autoloader it should be possible.
 
@CodingInsane You could probably do it in an autoloader…
How to properly register the class is going to be tricky.
You probably need to read through the declare class opcode handler
@CodingInsane Do you know how to use a debugger to get a backtrace?
 
you mean php's backtrace. or c
i usually use gdb when using c
are there any docs for the class opcode handler ?
 
3:08 AM
oh i thought there is an opcode handler iam still reading zend source code because i'm new to the engine and no much docs
 
master is a new playground all over again ;-)
 
@CodingInsane There are essentially no docs for anything.
Yeah. It sucks as bad as it sounds.
 
morning php
 
@NikiC Thanks for fixing the Generator opline issue [I was sleeping before and you just fixed it :-D] … But what exactly happens there with these var_flags? AFAIK this is sth new in phpng…
 
3:42 AM
This a blank page for you guys? zephir-lang.com
 
nope
i see a documentation page
 
3:54 AM
works for me too
 
Hmm. Having to use the way back machine.
 
4:09 AM
@LeviMorrison try 4proxy.de
 
4:20 AM
guys if i typehint function a(callable $a){} the callability is actually verified or is it just syntax checking?
yeah it is checked :P cool
 
4:56 AM
guys i'm writing some .phpt for fun. does it make difference to test type hinting of a function vs method (where no method compatibility inheritance is involved) ?
 
5:36 AM
@Ocramius this has me curious: how does Closure::call compare to binding ahead-of-time?
 
user3264876
6:20 AM
Hi guys , i want to update my table when my to date expiry. How can i do that on codeigniter
 
6:55 AM
guys, is it possible to pass an additional value to the callback of array_filter if the callback itself is a method of the object in which I call the array_filter...
...special prize to the one who can understand what I'm asking...
 
morningz
 
@JoeWatkins morning :)
 
7:11 AM
i think zend_lookup_class is responsible for calling registered autoloaders is there a way to intercept this process and call a C function from my extension ?
or should i directly put my function in autoload_functions HashTable if possible
 
7:39 AM
is there a way to generate a consistent hashCode for floats? rather than using, say
$set[number_format($float, 1000)] = $float; which i'm not sure makes sense :P
 
@bwoebi var_flags are used to signify whether a function by ref or by val
 
@NikiC Ah okay
 
@CodingInsane why would an extension need to autoload code ?
 
7:53 AM
@JoeWatkins no i'm not building an extension for autoloading. i need to get notified if a class is not found
 
hello, am i allowed to request some instances to an existing post?
 
do you have an idea about implementing this ?
 
error message you don't miss from the past:
> Fatal error: fatal flex scanner internal error--end of buffer missed
and good mornings!
 
Anyone here code PHP & ASP.Net as a job?
 
8:13 AM
you mean both langauges at the same time/job?
I once did some ASP while I was doing PHP 3, too. Then for all further projects I suggested to use PHP only... .
 
Hi, I had a doubt about gzip compression of a HTML file
I want to compress the html in PHP, and then save it on S3
so, can I save it with ,html extension on s3 after compression?
 
@hakre
I should rephrase my question. Does anyone have experience with professionally coding ASP.Net and PHP in their career?

I'm quite curious as a newcomer which is great to start off with and for later on, comparisons, popularity, etc.
 
@Oniisaki the problem with microsoft technology is, that it outdates relatively fast, they most often don't have a long time strategy with their products and any language you learn that is driven by MS will turn your learning into part of their product.
 
@CodingInsane for internal classes, or user classes, or both ?
for user classes, you could overload ZEND_FETCH_CLASS
 
@Keval You most likely don't ask about what you would like to know. Technically the file-extension is only informative, you can name it .bubbles-all-over-the-bathroom or what not.
What should happen with the file after you put it on S3?
And why do you gzip it in the first place?
 
8:24 AM
since internal classes are always found, and or you can check for them pretty easily once at startup, rather than on demand ... you only need to care about user classes, overloading the opcode seems best for that ...
if you're not married to the idea of writing it as an extension, you can overload that opcode in userland with uopz
 
I will use that compressed HTML from s3 while populating a div on my website
and that HTML is too big, varies from 2-30 MBs
 
So you use S3 as a webhost?
 
no, as a file host
i just fetch the required HTML for my main site
 
And you gzip because you would like to keep the upload time/bandwidth-usage small?
 
@hakre
Thanks, didn't consider that aspect of it. Guess it'll be a hassle keeping up with it in that case.

What do you think of its popularity compared to PHP as a professional coder?
 
8:26 AM
yep
 
@Oniisaki PHP is way more popular? Not that you should take popularity as a good measurement.
@Keval can't you enable compression only for the file-transfer?
 
so you mean i save the uncompressed HTML on s3 and while fetching it, I get the compressed html?
 
@Keval no I meant while uploading, but nevermind, this might be what you're looking for: Serving gzipped CSS and JavaScript from Amazon CloudFront via S3
 
Yes, I have looked into it beforehand, but I think I will research more on how gzip, s3 and all of it works
then I'd be able to determine how I must appraoch
 
mornin
 
8:31 AM
@Keval From a quick glance, if you want this stable, upload uncompressed.
good mornings @VeeeneX
 
alright
 
thanks ;)
 
good morning @VeeeneX
:)
 
@hakre
Thanks for your advice. Glad I asked.
Didn't consider keeping up with the language an influential factor.
I'm tilting towards PHP now but I'll still ask around a few more pros to be sure what I'm getting myself into. Cyas
 
@Oniisaki As some .Net pros as well. Because this is the PHP channel :)
 
8:33 AM
@hakre
Yup, will do
 
<?php
 
Guys, sorry for bothering but I've a security question, that I'm unsure of. Let me explain it to you, I have totally anonymous website and any user can post, comment, like. But how should I prevent spamming?
 
<?php $wel="Welcome"; $good="good morning"; $text=$wel.$good; ?> I want to add space between the two string how too do so
 
$text = $wel."spaceeee".$good;
 
seriously answer
 
8:43 AM
That was serious ;)
"spaceee" or " " is still a space
 
i have tried to add "" but no use
 
$text = $wel." ".$good; What about this?
 
its not working
 
@VeeeneX no… $text = "$wel $good";
:-D
 
:D
 
8:47 AM
:-p
 
9:01 AM
mornin
 
good mornin @tereško
 
moin
 
@Jimbo Do you drive with this car ? in your answer of PDO Login Script Always Re-Directing To Header Page
 
@hakre, why did you reccomend to upload uncompressed HTML?
 
9:21 AM
^ sounds like a typical case of "not enough context"
 
umm, I did not post a question only cause I did not know much. I know how to compress my HTML using PHP and now I know it can be saved as .html extension and then uploaded on my S3 bucket
 
you know so much, what don't you know?
 
I will not be loading the html as a webpage
it will be fetched using JS and then I add the HTML to a container
so will that be fine if I have gzip?
 
ThW
morning
@Keval have you tried it?
 
I was going to try that since I knew almost all the steps to acheive it, but since @hakre reccomended to upload uncompressed HTML to S3, I decided to wait and know the reason of why he said so
 
9:36 AM
@ircmaxell i'm still having big problems with integers on windows. i just downloaded php 5.6.8 x64 and PHP_INT_MAX is set to 2147483647 :|
it's not only the constant value, PHP_INT_MAX + 1 is a float
 
@Worf PHP 5 has 32 bit integers on windows
 
so the x64 refers to? doubles?
 
x64 refers to pointers
 
so the actual long support on win was introduced with php 7?
 
the actual 64bit number support, yes
The non-long number support, one should say. Thanks microsoft
 
9:43 AM
?
 
internet makes me sad
 
lol
 
9:59 AM
quick question, given a long nested loop, on which line does this script continue from the `continue` break
http://pastebin.com/H9czEHCe
complicated scenario but i just dont know where my error is coming from
 
Wau
 
hello everyone
how to download file when web page load in PHP/javascript automatically ?
 
Hello
 
morning (good night for me soon)
@vee
 
afternoon :P
 
10:03 AM
@veeenex my script is 10 lines long i think it explains what im asking
 
Bit complicated isn't it?
 
unfortunately its the only way to go about this for my scenario, working with an api
lots of grabbing ids and tracing back to its endpoint
granted, yesterday is the first time i read about the continue keyword
@HArdik can you give more background to your request
 
nothing complex may request
I just download file when i visit my web page its contain one .pdf/.doc file
I just download that file
 
do you want php to serve the file as a download? is that what you are asking?
 
yes
@RobMullins yes
 
10:13 AM
 
not but i will check it now
 
10:28 AM
@me in php continue is the same as break in a switch statement
 
10:57 AM
@Keval because all clients support uncokmpressed HMTL
@RobMullins what's wrong in putting this to a testbed? it's after the foreach ($d as $g) loop.
switch counts as loop structure in PHP.
@Worf on windows long is 32 bit.
 
11:38 AM
@NikiC is this correct 3v4l.org/dupOJ ? a 64 bit signed integer literal is not an int
 
@Worf yes
the minus is not part of the literal
-9223372036854775808 is actually 0 - 9223372036854775808
and 9223372036854775808 is not an integer
 
thought so thanks :P
 
not sure if you can call it "correct", but at least it's not totally wrong ^^
 
haha
-3
Q: Laravel 4 (I do not know what it is)

Xenko I should have a little problem, for some unknown reason to me is my code duplicates (or whatever you call it) here is a screenshot and what matters is that the $dir appear 2x path to the folder where the images I'm not sure what it actually happening. PS: I would add that it worked yesterday ......

classic
 
12:07 PM
I have a new favourite section of the Bible.
 
user1648409
12:21 PM
Hi, anybody here with good knowledge about MVC in PHP?
 
depends
 
Anonymous
behold for a wall of text
 
user1648409
me :D
 
user1648409
i have a huge project being worked on in PHP, it currently consists out of 50 php files with a few thousand lines of code. we don't have that much experience in php so we just went ahead and started working. currently we have a few classes that are sort of a collection of functions about one topic and then some php files that just "do their stuff". Noticing that this is getting messy pretty quick i want to restructure the code into MVC - whats the best way to go here?
 
Anonymous
This is a very vague question. You might aswell ask what MVC is.
 
user1648409
12:29 PM
I know what MVC is, i just fail at refactoring this "a few thousand lines of code" into something actually good to sue
 
"I know what MVC is" - actually, you almost certainly don't. Just because something has models, views and classes doesn't make it an "MVC".
"whats the best way to go here?" - just think really hard about what modules are meant to be doing, and separate them sensibly.
How to architect applications is a separate question to one of how to organise code though.
 
user1648409
thanks ^^
 
blah blah blah
> few classes that are sort of a collection of functions about one topic and then some php files that just "do their stuff"
@Shiuyin can you elaborate on this one ?
maybe you can share an example of what you are dealing with there (something that does not cover trade secrets)
because how you go about refactoring is highly dependant on your starting point
 
Anonymous
I would begin writting tests first, then do the refractoring later. Whatever method you chose to refractor the code, you are bound to make some errors, so tests will atleast guarantee you have this problem taken care of @Shiuyin
 
as for "generic advice": the first step would be trying to separate the DB-related interaction from the rest of the logic
@samaYo please, stop
 
Anonymous
12:34 PM
hun?
 
Anonymous
tests are bad?
 
Anonymous
I know the MVC paradigm is completely your territory, but that doesn't mean we don't know a thing or two. @tereško
 
@samaYo you are making baseless assumptions
maybe wait till the OP actually shows some example of what his code looks like
 
@samaYo Ever heard that if you don't know anything, you say nothing. If you know a bit you think to know it mostly and shout loudly. If you know a bit more, you realize knowing nothing… If you know a lot, then you answer moderately, just as much as you can really back up with your knowledge…
 
@samaYo you obviously have never had to refactor a large codebase. "Start by writing test" is usually what leads to abandoning the whole ordeal.
 
12:40 PM
Especially… if you want to test everything, you just end up loosing too much time and motivation.
Tests are nice. And [yeah, I know some disagree] full coverage is usually overkill.
 
Anonymous
OP has 50 files of php project with thousands of lines, and neither he nor his team has that much experience in php, and they want to refractor!!. If I am not missing something, this is a perfect use case for wrtting tests. Wheather they will lose interest or not is irrelevant. You don't recommend people to follow the w3schools guide instead if the phpmanual based on that way of thinking do you?
 
@samaYo again with the fucking assumptions
please stop
 
Anonymous
@Shiuyin don't use the php.net to learn anything about php. You may loose interest :)
 
@samaYo please stop
 
@samaYo, please, STFU
 
Anonymous
12:47 PM
ok, got the idea.
 
.. ok .. @Shiuyin, in case if you did not already leave after the initial flood of stupid (which seems unlikely at this point), is there any code which you can actually show us without breaking NDA? If not, you will have to give us more detailed description. And some info on architecture: is it globally scoped, autoloaded, namespaced, static, include-based ? Things like that.
 
@tereško he already left, see the list of users in here.
 
php has actually one of the best documentations. you have no idea how terrible others are @samaYo
 
Anonymous
@Worf I know
 
Anonymous
12:50 PM
I was trying to think and see the world in someone else's head.
 
Anonymous
:)
 
@bwoebi then I must express my congratulations to @Danack and @samaYo for being complete assholes to someone who said nothing wrong.
...and coming from me
 
Anonymous
wth!! I was honestly trying to help him.
 
Anonymous
18 mins ago, by samaYo
I would begin writting tests first, then do the refractoring later. Whatever method you chose to refractor the code, you are bound to make some errors, so tests will atleast guarantee you have this problem taken care of @Shiuyin
 
@samaYo trying to help doesn't always help someone ;-)
 
12:53 PM
what's happening
 
Nothing relevant
 
just be friends ok
@samaYo have you ever tried reading mysql documentation? you get 50 bonus words for each actually needed to explain a concept
 
@Worf actually the entire Oracle™ ecosystem suffers from terrible documentation
.. and then there is Facebook,
 
java generated documentation is not bad but usually lacks of code examples
 
Mornings
 
1:05 PM
hola
 
btw, Onepunch-Man manga is late =(
 
hello
can anyone help me in php how to get difference between two date using mysql query
 
check datediff function
 
well ... it's easy: you write in google "mysql date functions", which takes you to dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
 
ok thank you i will try
 
Anonymous
1:19 PM
good luck
 
Anonymous
may the force be with you :)
 
or, if you need it in seconds you can just use SELECT UNIX_TIMESTAMP(date1) - UNIX_TIMESTAMP(date2) AS difference_in_seconds FROM FooBar
also, stop staring, those are NOT upvotes
stars are "community bookmarks"
 
ok thanks
 
@samaYo I'd assume that his code isn't testable at this point :P
 
Anonymous
@MarcelBurkhard for his sake, I hope that's not true :)
 
Anonymous
1:32 PM
call me a noob but, isn't any mvc-oop application tastable to some point?
 
@NikiC thoughts about this 3v4l.org/VlWbd ?
 
@samaYo You can test everything. It just gets increasingly harder to test everything.
 
shouldn't it throw an error or something?
 
@Worf Yes, I think that's a better idea. \cc @NikiC
 
Anonymous
@bwoebi I doubt it is possible to test everything, which is why I said mvc-oop since it would be impossible to test flat-file php projects.
 
1:42 PM
0 is enough for identifying the problem but i don't think people are willing to check that, they most likely prefer getting an error, no?
 
@samaYo wrong.
 
Anonymous
maybe test http status, css and js exists ...
 
Anonymous
but nothing major
 
@bwoebi yeah, agree that this should be an exception as well, given how we already have one for div by zero
 
yay i contributed to php! #smugmode
 
1:51 PM
 
@NikiC okay, pushed. \cc @Worf
 
:D great!
 
@Jimbo Mornings
 
/me waits for stacktraces on EngineExceptions
 
@samaYo who said it was a mvc application? He said he wanted it to become mvc
@samaYo don't know how it tastes though :P
 
user4793675
2:22 PM
Goodafternoon everybody.
 
user4793675
I have a quick question about the Symfony annotation and the firewall, anybody knows anything about it?
 
can anyone help me to to add css in cake php head i want to make responsive the site but i can't in which file i can add
 
2:34 PM
??
 
Anonymous
@Worf to the php src?
 
ya. wish i could actually contribute with something xD
 
anyone help me in cake php
4
?
 
Anonymous
I made a simple contr. to the doc but not yet accepted :/
 
Anonymous
i just have to wait a little more to see what is going on
 
2:41 PM
link? @samaYo
 
i only want to add a css file in head
but i can't find
where can i add
 
Anonymous
 
I know the code echo $this->Html->css('cake.generic');
but where
 
in the cake, duh
 
yes
 
2:43 PM
@FlorianMargaine The cake is a lie.
@ShakirKhan I don't think anyone here uses Cake. You'll probably need to ask elsewhere.
 
but there are not separate chat room for cake
if any one can please help me
i need it urgently
 
Is it really urgent @ShakirKhan?
 
yes
 
Well sucks to be you then...
 
Anonymous
lol
 
2:46 PM
.........looks like php docbook online editor needs to be nuked
@samaYo sorry i failed to understand how it works :D
 
@Worf Yeah the thing is horrible
 
Anonymous
@Worf very much agree to that. It is slow, complex and just old looking
 
@PeeHaa examinr news?
 
Stalled. Busy working on something that makes money
 
eheh
 
2:54 PM
@PeeHaa Money doesn't matter. Stall that.
(no, not seriously ^^)
 
:P
 
Anonymous
Adsense is giving me some hope, the charts show i am making more than last year, and the year before that. if it keeps growing at a simlar rate, I could be on my own, and not have to work after 37 years.
 
Trust me if I had enough money I would write FOSS 100% of the time
Enough by my own standards that is ;)
 
I recently passed US $100 on my youtube channel.
 
sorry .. I actually cannot imagine what I would do, if I had enough money
I cannot comprehend such state of being
 
Anonymous
2:56 PM
I probably have been asking the wrong questions here. Exactly how do you people get money from? :)
 
if i had enough money i'd become poor in one day
 
Anonymous
some people seem like they get paid to chat :p
 
@samaYo really? :D HOW? :P
 
where do I sign up ?
 
You mean you people aren't getting paid to be in here?? :P
 
2:58 PM
@Worf by making silly voice and screaming like a little girl - businessinsider.com/…
 
lol
 
er, volume warning.
 
@Danack that thumbnail looks creepy.
 
holy fuck!
 
Who looks at it and thinks "that will be funny" ?
 

« first day (1645 days earlier)      last day (3297 days later) »