« first day (1688 days earlier)      last day (3254 days later) » 
00:00 - 19:0019:00 - 00:00

12:19 AM
@Worf Not a fan.
 
@Worf that undefined type is called null in PHP…
 
@Andrea Array and String should be objects with object semantics /ducks
 
@LeviMorrison heh
 
@LeviMorrison sounds like C++.
 
@LeviMorrison Personally I think PHP's by-value assignment is a good thing
 
12:21 AM
Internally things would be much simpler if arrays and strings were just objects.
We could maybe make a by-value object and by-ref object distinction and then they'd be good to go.
 
Yes, because then we force the programmer to think about copying versus modifying
While currently we do it for them
 
With that internal machinery we could maybe allow by-value user objects.
Not sure if we'd want to; I'm just talking from engine simplification view.
 
12:47 AM
Im guessing you guys no CSS?
or is CSS questions not allowed
 
this channel only accepts questions regarding gardening and pegging
 
@tereško Pegging like stap ons lol whaaat the hell
Thats nasty dude
 
you have to be careful about what you google, because it tends to affect your recommended ads
 
Anonymous
If set_exception_handler() internally catches the exceptions, then why does it halt execution of following script?
 
... just so you know
 
Anonymous
12:53 AM
Can someone direct me to the C src regarding the internal implementation of the set_exception_handler() ?
 
@samaYo , IIRC it had something to do with the point at which the handler gets triggered
 
I gtg im gonna install Windows Server I still dont know what you were getting at what you wrote "this channel only accepts questions regarding gardening and pegging"
bye
 
@samaYo which script?
 
Anonymous
@bwoebi just on something I am working on. using exception handler and need it work like try{}catch(){}
 
12:58 AM
@samaYo can you share a tiny snippet?
 
Anonymous
on mobile, but it's most likely I am doing something wrong ... as always. If it seems serious, I'll share.
 
@NikiC I did some poking and it seems zend_class_entry.type is only for keeping track of ZEND_USER_CLASS and ZEND_INTERNAL_CLASS. Definitely can be part of ce_flags.
 
@LeviMorrison that'd save us 8 bytes… maybe.
 
@bwoebi It would save 8 bytes on x64 per CE (which may not affect anything)
 
@LeviMorrison yep
 
1:12 AM
In my opinion it's just weird to have that and ce_flags .
I wonder how many internal classes there are for standard builds.
I'm probably just going to reuse those bytes with an enum anyway when I do algebraic data types.
Whether that gets accepted or not, who knows?
 
1:47 AM
@LeviMorrison IIRC that's 100% true, yeah
Though, if the compiler is moderately clever, it'll pack that char next to other byte-wide elements. Did you check offsetof()?
 
In this case the next thing is a pointer.
So it'd have to reorder, which is basically not guaranteed.
(and I think it isn't technically permitted)
I'm thinking about a structure like this:
struct zend_type_entry {
        enum {
                ZEND_TYPE_ENTRY_CLASS,
                ZEND_TYPE_ENTRY_INTERFACE,
                ZEND_TYPE_ENTRY_TRAIT,
        } tag;

        union {
                struct _zend_class_entry i_class;
                struct _zend_iterface_entry i_interface;
                struct _zend_trait_entry i_trait;
        } impl;
};
That would be expanded to be include type expressions and enums for those RFCs.
 
2:06 AM
hello, is it possible to make a realtime news feed with phpRatchet websocket socketo.me?
 
2:49 AM
@NikiC Why does ?? not support ArrayAccess? :-(
 
3:03 AM
@ircmaxell An idea: what if you could shadow the standard operators within a given context?
2
use function JaneSmith\Example\ComplexNumberLibrary\{
    add as +,
    mul as *,
    div as /,
    sub as -
};
That, or the ability to use functions infix (in Haskell you can write add(1, 2) as 1 `add` 2 if you like), would eliminate most of the need for them
 
@Andrea that I'd be cool with
@Andrea nah
 
@ircmaxell It's a really neat feature
 
agree
though I do like the prefix behavior of infix operators (+) 1 2 3
 
You can have both!
-- In Haskell you can do:
a = 1 + 2
b = (+) 1 2
add a b = (+)
c = add 1 2
d = 1 `add` 2
add a b = is a function declaration, by the way.
So operators can be used prefix, and functions can be used infix.
 
yup
which is why I said it :-)
blah
I'm bored
my plane doesn't leave for another 4 hours
 
3:14 AM
In the airport?
 
3:56 AM
No, hotel bar...
Heading to the airport soon, because bored...
 
4:20 AM
Hi
Somebody help me please
-1
Q: Instead of a web browser can the 'SSE(Server Sent Events)' be implemented in REST API developed using PHP Slim framework?

user2839497I've developed APIs using Slim PHP Framework for accessing the resources of a website which is developed in 'PHPFox-a social networking platform created in php'. Now at one point I want to implement 'SSE(Server Sent Events)' into one of my APIs. I researched about this but everywhere I got the s...

 
4:57 AM
I started to rewrite an antique compiler I've wrote before, in PHP and that targets ZPL. I'm having doubts about what to use now, if I should write it by hand or use some parser generator, such as Bison...
@Andrea I really like the manner that operators work like functions in Haskell, and the way that they can be functions and that they can be positioned. This would be a big advance to PHP language!
One of the best parts of PHP 7 accepting (function() {})() based syntax is that you can implement currying in an easier and nice manner, making some possibly native functions curried.
$add = '+' // = function($x) { return function($y) { return $ x + $y } }
$add_1 = $add(1) // => function($y) { return $x + $y; } // where $x is in upper scope
$add_1(10) // 11
"+"(10, 20) // => 30
The Whip compiler makes something similar: github.com/haskellcamargo/whip/blob/master/src/stdlib.coffee
 
5:24 AM
Flight boards in an hour. Sigh...
 
5:42 AM
Hi
anyone help me
 
5:54 AM
morning
 
 
1 hour later…
6:56 AM
Hi all
can I ask a question about IIS in here?
 
 
2 hours later…
8:37 AM
@kelunik It doesn't?
 
@NikiC Well, it checks if offsetGet is null, but it doesn't use offsetExists.
 
@kelunik Does the equivalent isset($x) ? $x : $d work?
 
@NikiC Yes: 3v4l.org/eOeRq
 
8:54 AM
@kelunik Yeah well ArrayAccess sucks
FETCH_IS only calls read_dimension with BP_VAR_IS flag, but does not call has_dimension
So this means that isset($arrayAccess[$foo][$bar]) must essentially be broken as well, because it doesn't do an isset check on the first index
 
Yeah, it does. I don't know, maybe we should switch to $session->get(...) and $session->set(..., ...). /cc @bwoebi
Maybe even __get and __set: 3v4l.org/fb8IX ^^
 
Those would likely have the same issue though?
 
how to delete mysql rows starting from an index suppose consider 21 to till the end of the table
 
9:09 AM
Well, right. Another option is to return null instead of throwing an exception in offsetGet.
@santosh DELETE FROM table WHERE id >= ? ;-)
@NikiC How complicated is a fix for it?
 
9:54 AM
@santosh DELETE FROM Table WHERE id >= 21;
 
@MarcelBurkhard @kelunik thanks for you help
 
10:21 AM
Woo my application got accepted
Feeling like the happiest man on earth
 
@HassanAlthaf Application what for?
@kelunik Unclear. Per se should not be hard, but I feel like changing this will have weird implications all over the place
 
@NikiC What kind of implications do you expect?
 
no idea, just a hunch :)
 
It's the expected behavior, but the RFC doesn't explicitly say that a ?? b is equal to isset(a) ? a : b.
I expected something useful. :-(
 
10:38 AM
Oh, you mean only fixing ??
I was thinking about fixing the behavior of isset() with ArrayAccess (and this as well, as a result)
 
@NikiC What do you want to fix there?
 
@kelunik isset($arrayAccess[$foo][$bar])
 
@HassanAlthaf which application? not clear
 
@NikiC afayk is there a way to workaround the "indirect modification of overloaded" stuff problem in user space?
(an array access whose contents are arrayaccess as well)
 
@NikiC It's working with __get: 3v4l.org/emLTU
 
10:44 AM
@kelunik By your definition it isn't working
Because there is no __isset call before the __get calls
So if the property does not exist and __get throws you'll have a problem
 
@NikiC Oh right... missed that.
 
10:56 AM
@NikiC PHP7 is a major version and if everything is implemented right, it shouldn't matter if __isset or offsetExists is called before. :P
 
11:18 AM
moirning
 
@PeeHaa o/
 
\o
 
11:53 AM
Welcome everyone !
I have a question: Do I need to have wamp server installed in order to include php code into html page ?
 
0
Q: Why the values are continuously getting printed since no loop or no next call is given to the PHP file?

PHPLoverFollowing is an demo example of 'Server Sent Events(SSE)': HTML code(index.html) : <!DOCTYPE html> <html> <body> <h1>Getting server updates</h1> <div id="result"></div> <script> if(typeof(EventSource) !== "undefined") { var source = new EventSource("demo_sse.php"); source.onmessage = funct...

 
I mean I have some parts of my pages the same, and I heard that it is possible to have them in one place, and then with php include in all pages....
 
12:15 PM
mornin'
 
Mogguh @tereško
 
12:40 PM
oh cool
looks like my wallet was stole
 
:|
That sucks
 
some time between yesterday and wednesday
with (at least) 200 euro in it
 
Damnit
That would have been a proper night of drinking :(
 
well, at least the credit cards is always kept in the phones "wallet"
 
Anonymous
1:11 PM
moarning
 
Anonymous
anyone has a good idea for javascript pet project? I gotta start giving js a serious learning time, if I'm ever gonna find a job.
 
Anonymous
@tereško @PeeHaa
 
how complicated of a thing are we talking about ?
 
i once lost my wallet and i got it returned by a guy that said "i took 50€ from it as reward, you are welcome"
 
Anonymous
intermediate things
 
1:18 PM
clearly i couldn't complain :-\
 
try making a native lightbox clone
seems like a straight-forward example, with a lot of room to expand
and with "native" I means "no jquery"
 
Anonymous
Yeah, I know. And thanks .. seems a nice idea. It might be harder than a tooltip though ... which I was thinking about.
 
.. then again, even if you were to use jquery, you would have to make it as a plugin with native code underneath .. that seems like pointless additional complexity for a study-project
 
Anonymous
Nah, I don't like jQuery. never did, and I don't know anything about it, so far.
 
@samaYo depends on what your stated goal is. In optimal implementation the tooltips have lot to do with css position
and since "text" is not known size , it gets really tricky
lightbox has less moving parts
 
1:24 PM
tooltips are tough
 
Anonymous
@Worf really?
 
really
 
because you want to support several modes, like attaching it as child of the origin element, or say, <body>
 
@samaYo we are talking about timed events, typography and adaptive css
 
in desktop terms, you need to support vertex-edge || center-edge * x-axis || y-axis
lot of stuff
 
1:27 PM
(for example: you cannot show the tooltip on the top, if there is not enough space for it in the viewport)
 
and, if an ancestor element has overflow:hidden you need to take count of that
 
Anonymous
@tereško but how about using z-index? meaning, no need to check if there is available space first. Just like this room does when clicking on image profiles.
 
@Worf that can be bypassed by having single "tooltip' box appended directly to body, but that in turn adds another layer of complexity
 
@tereško in fact it's years that i'm waiting display:popup to be adopted by w3c
mozilla uses it with xul
and it's okay, very handy
 
Anonymous
Btw, my experience with JavaScript goes as far as making ajax calls, and simple dom manipulations .. and that's it. I didn't want to learn jQuery saying to myself, I ought to understood a good portion of JS first, and now as the result this is where I am. Probably the first web developer, who knows nothing about jQuery. :/
 
1:33 PM
also, you need to take count of scroll offset. imagine: sketchtoy.com/65236840
 
@DanLugg how did you even
 
@samaYo then you might actually have start by reading this: eloquentjavascript.net (free, online)
 
Anonymous
@tereško I might buy it, if that is that is newbie friendly. I don't want any advanced stuff which only serves a discouragement at the end. Also, does the lightbox has to have the transparent black-ish bgackground?
 
> Btw, my experience with JavaScript goes as far as making ajax calls, and simple dom manipulations .. and that's it.
I am actually not sure if you should be tinkering with "advanced" or "intermediate" level stuff
because making a lightbox assumes that you know how to do event delegation and closures
this might be a bit too complicated
> Also, does the lightbox has to have the transparent black-ish bgackground?
no, the color doesnt matter, but you might want a layer there anyway to, because you will want to close the "image preview" when user clicks outside
 
Anonymous
ah, yes that one. Well I'll just try it, without looking at any example and see how I fare
 
Anonymous
1:45 PM
I know a bit about events, so I may get somewhere at the very least.
 
@Andrea Fucking magic :-P
Seriously though, recycled the markup into the output page with meta refresh.
 
2:28 PM
@DanLugg y u rebecca on Sundays :3
that one got me, congrats
 
@marcio Look at the timestamp ;)
 
@PeeHaa that was the best obfuscated rebecca evah
 
All hail our rebecca trap overlord @DanLugg!
 
All hail indeed!
 
3:22 PM
will that ever be completed...?
 
I hope so :)
Tnx for PR btw
I should probably also ping @salathe about it at some point considering he is our docs overlord now
 
Yes
 
3:36 PM
@ircmaxell Do I remember correctly that you were working on a javascript parser in php?
 
you probably should ping me :)
 
Morning docs overlord :)
All hail the king for he has conquered docbook
 
hello, is it possible to make a realtime news feed with phpRatchet websocket socketo.me?
 
yes
You're welcome
 
can you lead me to the right direction on a stackoverflow question?
 
3:39 PM
No
Your question is too broad and sounds like the official ratchet docs would suit you well
 
Docs as in documentation or api docs?
 
Both or either
 
ok thank you
 
And another satisfied customer
 
Semi satisfied... lol i wanted to see a different example from the one on ratchet just to compare them
 
3:43 PM
That will be five dollar to the bank of PeeHee
 
No refunds!
 
haha
 
\o/ It's sushi time
 
4:01 PM
Hi
What's going on here guys...
 
4:22 PM
Hey
 
4:39 PM
Guys I have a page where there is a checkbox and some text. Now on checking/unchecking the check box a field in db gets set as ON/OFF. Now I want the admin to be able to view the page at all times(only after loging in) but the others should be redirected to some error page if the field in db is set as OFF. what is the best thing to do?
 
4:53 PM
evening
 
5:05 PM
@Worf can you help?
 
no
 
Still thanx for reading my problem.
 
Morning
 
5:23 PM
Is there a vagrant command that powers a VM in is in the off state, without doing the provision step?
 
Anonymous
@salathe where is my doc karma?
 
@samaYo you don't even have a php.net account, no?
 
Anonymous
Nope. I tried to get one like 13 times, I think that thing is broken.
 
Anonymous
Gave up in the end.
 
@samaYo where did you try to get one?
 
Anonymous
5:35 PM
 
Anonymous
 
Anonymous
Though the latter may have to do with my ultra-slow internet connection or the fact that site is horribly designed :/
 
@samaYo currently there is only one outstanding request… your requests then probably were rejected?
 
@samaYo I know about Drupal, yes, did you have a question?
 
Anonymous
@bwoebi Once I got an email saying it was rejected, the other 12 times didn't get any.
 
5:41 PM
@Andrea what is wrong with good old operator overloading?
 
@Worf Ask @ircmaxell
When it boils down to it, though... operator overloading is really messy
PHP actually has operator overloading internally, but it's not exposed to userland. It's just there for GMP.
 
how about bcmath?
... nope
gmp supports only integers iirc, right?
 
Anonymous
@FlorianMargaine Cool. I just wanted to know moaar about views. I have a blog site, very simple with only (title, slug, content) columns. I don't want to use drupal to show these, as I need speedy page load time, but I need drupal only for the backend tasks, like submitting new article, editing ... so, I am told views is one way to fetch and show the blog, without using the drupal interface.
 
if you ask python folks, they don't randomly overload operators just for fun. but when they do, it's gold. it's a powerful feature that as many other powerful features shouldn't be abused
 
Anonymous
is that 100% accurate @FlorianMargaine
 
5:46 PM
@samaYo "without using the drupal interface"?
 
@Andrea there is nothing i can say to convince you that we should have both equals and compareTo, is it?
 
@samaYo no idea, there's no code preventing applying twice via php.net/git-php.php ...
@samaYo also, do you really need a cvs account?
 
@Worf Actually, I think there might be some merit in being able to disallow comparisons. But I do wonder if it might break things. Also, it must be strictly one or the other if you're going to have them, and it must be symmetrical.
 
@PeeHaa yes
 
Anonymous
w/o using drupal at all. Let's say you have a clean index.php file and you want to show article title, content, date ... based on the requested uri, which would match the article slug. i.e. foo.com/this-is-title` so in this page, I just want to query the db and fetch the contents, but I was told using custom pdo wrapper and doing a query is a bad idea.
 
Anonymous
5:51 PM
@FlorianMargaine
 
Anonymous
@bwoebi I'll try again. And I need the cvs account, just to see how it works and familiarize myself with it, at-least for now
 
@samaYo so basically you want drupal backend, and doing the frontend on another website?
 
@samaYo you can edit without account too, just not directly commit afaik
 
@Andrea hum, what do you mean?
 
also, did @salathe recommend you to get an account?
 
5:53 PM
@Worf I don't think $a < $b ever errors, currently
So maybe it'd break something. But I worry about this sort of thing a bit too much, I think.
 
Anonymous
@FlorianMargaine yes. because the site's front-end content material is too simple, and light to use drupal, but for the content management, I def need drupal.
 
Anonymous
@bwoebi thanks :)
 
@samaYo thanks… what for?
 
@samaYo honestly just learn drupal and use its frontend
 
Anonymous
@bwoebi the attention :)
 
5:54 PM
other solutions are... more complicated
you could use your own index.php and load drupal... but in the end you have a full-blown drupal too
your "best" bet would be to use something like services and use drupal as an http api...
but imho you should just learn drupal and use its theming system
 
@Andrea if it breaks something, you can always fix it. if we introduce in a language something that is poorly designed we are screwed :P this is actually harder than it looks. Will take a lot to decide what to do, i'm not sure about it either
 
Anonymous
@FlorianMargaine I have learned the management part, but just not quite familiar with the code base. I did create a small wrapper to directly fetch content from the database, but still buggy ... anyway, I'll look at the services for now.
 
Anonymous
@FlorianMargaine is there an api/service that returns database content using json?
 
Anonymous
that would suit my needs
 
speaking of equals. another option that Levi suggested would be having typed equals()
class ArrayList implements Equatable<ArrayList>, Equatable<TreeList>, Equatable<LinkedList>, Equatable<NULL>{
    function equals(ArrayList|TreeList|LinkedList|NULL $other) : bool{

    }
}
 
6:00 PM
@samaYo hm, did you read the link I just sent you?
 
but i'm not sure about it
 
@Worf do you know about generics?
 
actually no, that's bad
@FlorianMargaine ?
 
so?
 
6:03 PM
your code looks very repetitive, generics would probably help you
 
my code is correct
:P
 
@samaYo Have you applied for doc karma?
 
@ircmaxell The js minifier I am currently working fails on me. Would your project be helpful for me to create a minifier?
 
Anonymous
@salathe do I really need to do that? I thought since you merged my edits, you would've the ability to give the karma. Isn't that how it works?
 
@samaYo Yes you really need to do that, there's a process in place that everyone needs to follow.
 
6:08 PM
@LeviMorrison so i realized why typed equals() would be bad
function equals(self $stuff){}  // allows both self and classes derived from self. it's basically useless then
equals should be implemented doing:
function equals($other){
    return get_class($this) === get_class($other);
}
rather than
function equals($other){
    return $other instanceof self;
}
 
Anonymous
@salathe so the answer is again to start from here php.net/git-php.php ?
 
I only see one @php.net account request from you, back in October and that was for php-src... that bjori rejected. And I've only credited you for one doc patch so far, which ones did you provide?
@samaYo yup
If you've applied dozens of other times, I can't see them in the normal mailing lists where they usually go.
 
Anonymous
> We could not have said it more clearly. Read everything on this page and look at the form you are submitting carefully.
 
Also @samaYo git.php.net/?p=web/master.git;a=blob;f=include/… there are only very few people who are able to grant you access
@samaYo you've unchecked everything correctly etc.?
 
Anonymous
Yes. I checked what I seemed was the right thing to select.
 
6:15 PM
@samaYo yeah… just that you must not check anything in that list ^^
but why do I tell that you… you should find that yourself out ^^
 
errrr WTF O.o
450   if ((int)$user) {
 451     $query .= " WHERE users.userid=$user";
 452   }
 
@PeeHaa yeh, safe for sql inj :-O
@PeeHaa but not exploitable.
 
How is it called?
 
called in a context where it doesn't create any harm to get an arbitrary number of rows back
 
@bwoebi Where is it used?
 
6:21 PM
 
Because well the password is also in there of users
 
@PeeHaa yeah, but it's not plaintext password
and the password isn't even displayed
 
The fact that a password is not plain text doesn't mean I just share my user tables with the world ;)
Also yeah it is not safe
^ that is where the recordset is used
 
sure, but only admins may call that function?
(these who also have push access to that repo)
 
Idunno. I don't know nearly enough about the horrible thing to know what can do what
 
6:24 PM
^^
looks like from PHP 4 times or even older
 
This is exactly how vulnerabilities happen. Everybody who writes new code for master can introduce them without knowing.
God the further you look the more your eyes start to bleed
 
@PeeHaa btw. git.php.net/?p=web/master.git;a=blob;f=manage/… everything's sanitized
 
@PeeHaa folks only touch the *.php.net websites code as little as they possibly can... no-one has the time or inclination to do a complete rewrite of even just something so small as master.php.net
 
Hello Everyone
1
Q: csv file import to mysql database using php facing error to import

Pratik SoniImporting CVS File (Microsoft Office Excel Comma Separated Values File (.csv)) in phpmyadmim using php script. When i am importing CSV File then its not importing properly into the database. Line is terminate by "," Please suggest me how i make it line terminate "auto", i am attaching sample file...

 
Promised post mortem that never comes in 3... 2...
 
6:30 PM
@PeeHaa 3... 4... 5... :)
 
:P
 
Can hou help me to solve my problem ?
 
Gotta love Java's overloading.

remove(int index)
Removes the element at the specified position in this list (optional operation).
remove(Object o)
Removes the first occurrence of the specified element from this list, if it is present (optional operation).
 
Anonymous
@PratikSoni ask
 
Anonymous
I have left my magic crystal at home.
 
6:36 PM
Ohhhhhh.
 
user1648409
6:54 PM
What should i do, when "Commands out of sync; you can't run this command now" appears in mysqli, by just calling a normal query() ?
 
Anonymous
what is in the query?
 
@Shiuyin Have you checked the docs?
 
user1648409
@PeeHaa in the docs it says, that i called functions in the wrong order. okay. however this is a simple "SELECT * FROM Forms" - why should it be wrong to call this?
 
Anonymous
that can't be it
 
When searching on google I get decent results. Why didn't they work for you? @Shiuyin
 
user1648409
6:58 PM
@PeeHaa because i have a strong feeling, that my mysql is correct, the error is coming from something completely different
 
When somebody asks you why some technical thing X doesn't work answering with "I have a feeling" is... strange
 
00:00 - 19:0019:00 - 00:00

« first day (1688 days earlier)      last day (3254 days later) »