« first day (1686 days earlier)      last day (3262 days later) » 

1:01 PM
can anyone provide me demo example
to get facebook events
 
Anonymous
there you go.
 
Is there a good reason for __getStatic()/__setStatic() not existing? Not that I want it for anything but it seems odd that it doesn't exist given that someone bothered to implement __callStatic()
 
user895378
@DaveRandom If I could go back in time and prevent & references in PHP I would. I suspect this is the reason why __getStatic() and __setStatic() don't exist :)
 
user895378
Because they are horrible and it's best not to add horrible things to the language if you can help it
 
1:04 PM
Yeh it was more surprise that no-one bothered to do it when they were doing __callStatic(). I agree it shouldn't be there, __callStatic() shouldn't be there either.
 
user895378
How difficult would it be to expose to userland the command line switches that were passed to the php binary? This is something that would really help me and it seems like it should be exposed ...
 
Yeh I have wanted this before
 
user895378
i.e. a simple variable in $_SERVER with the full raw command
 
$_SERVER['cli_argv'] or something
 
user895378
If you're starting up worker processes you have to do things like:
 
user895378
1:07 PM
$cmd[] = PHP_BINARY;
if ($ini = get_cfg_var("cfg_file_path")) {
    $cmd[] = "-c $ini";
}
 
user895378
Nope.
 
@FlorianMargaine No, arguments passed to the PHP binary, not the actual script.
 
@FlorianMargaine arguments which started the php binary, not the script
 
1:08 PM
history | grep php :D
 
Presumably not too difficult, since you don't need thread safety in the CLI and it would be read only, you could just put them in a global var at the beginning of main() and shove them into $_SERVER when you are populating $_SERVER['argv'], and they aren't relevant to any other SAPI @rdlowrey
 
@SergeyTelshevsky That's actually something that could work. ^^
 
only if you start it manually :)
 
user895378
How do you know which history line you want? that leaves you with a race condition against other php processes ... Doesn't seem reliable
 
user895378
(also not available in windows)
 
Anonymous
1:11 PM
@SergeyTelshevsky +1 for devastate
 
Anonymous
is that on 1080 btw?
 
Anonymous
looks cool
 
I don't remember, I worked last time on a mac 2 years ago, it was some iMac
most likely 1440
yep, 1440
 
Anonymous
i'll give it a try.
 
Anonymous
/ no dark is dark enough for me.
 
1:16 PM
there appeared some bugs after ST implemented icons in the sidebar, I'll have to update it sometime.
have a good weekend, everyone
 
@rdlowrey I cannot for the life of me find the place where $_SERVER['argv'] is populated
 
[Friday gif] Segmentation fault
7
 
@rdlowrey Without windows support:
<?php

function command ($pid) {
        $ps = `ps -p $pid -o cmd --no-headers`;
        return substr($ps, 0, -1);
}

var_dump(command(getmypid()));
 
#if 0
            /* Zeev might want to do something with this one day */
        case PHP_MODE_INDENT:
            open_file_for_scanning(&file_handle TSRMLS_CC);
            zend_indent();
            zend_file_handle_dtor(file_handle.handle TSRMLS_CC);
            goto out;
            break;
#endif
Gee, thanks
 
user895378
1:28 PM
not where it's populated but that's where we could hook in I think
 
@rdlowrey That bug issue I submitted. Doesn't seem to pause atm. Unsure if it was certain pages of these. Either way, makes it not easy to replicate now.
 
user895378
@Fabor :/
 
Anyway, it was weird not having the timeouts work
 
Yeh I've just been poking around in that function, there's also lxr.php.net/xref/PHP_TRUNK/sapi/cli/php_cli.c#955 but I can't see anywhere that any of the elements are populated
 
guys, are you ok?
 
1:35 PM
I'm a tad tired but otherwise fine.
Thanks for asking!
 
i mean, it's 3:30 PM and i got rebeccad 0 times
 
1:47 PM
@Epodax well done
@Worf The "Managers" distribution group in my office is not doing as well as you.
 
@DaveRandom Thanks you :)
Good weekend.
 
@Gordon you didn't even try
I would not click such crap even if it's not Friday (:
 
@AlmaDo oh come one. I even used a linkbait generator for this.
 
@Gordon poor excuse :p
 
1:53 PM
I would like to invest in baby kittens though
Not fussed about the millionaire part
Billionaire would also be fine
But only long scale billions, short scale is for wussies.
 
you aim to live long?
 
Meh, only another few long scale quintillions of years. Until the heat death of the universe would be fine. Either that or until next Tuesday.
 
sdd
2:39 PM
I need help with simple PHP problem, anyone?
 
People can't give answers without questions.
Not correct ones at least
 
sdd
I am using PHPMyAdmin and am trying to add a value to my table by entering an url into my browser.
 
@sdd That's scary. If I guess the URL I can wreck your DB
 
sdd
the php file contains; $query = "INSERT INTO recgeklikt (appname, imageurl, appurl) VALUES ('" . $_GET['x'] . "', '" . $_GET['y'] . "', '" . $_GET['z'] . "');";
You seriously can or you just joking?
But when I enter the url, it says succesfully added, when I check my table, it's still empty?
 
@sdd Have you never heard of SQL injection?
 
sdd
2:45 PM
I am reading it now, thank you I will use it.
Have you any idea of a solution to my problem?
 
Have you tried echoing the SQL you're sending? It's the best place to start. Also, echoing the errors MySQL passes back are also useful
 
sdd
echo "Successfully added ";
echo $query;
This is what I get: Successfully added INSERT INTO klik (aa, bb, cc`) VALUES ('cc', 'bb', 'aa');
 
are you using mysql_query or mysqli_query?
 
sdd
$resultset = mysql_query($query, $connection);
 
after that try echo mysql_error();
and I hope that extra tick in your query is a typo
 
sdd
3:00 PM
aha
thanks for the echo error
My account had no permission to write, read-only
 
3:24 PM
@sdd use PDO in exception mode, then it shouts at you when there are errors
 
Start here
 
@DaveRandom i wonder if that will be fixed someday :P
 
Anonymous
3:39 PM
Is it possible to change the behaviour of say .. the $_GET variable? as in modify or change something in it once, and that change persists in every instance of the get var, across any (class/func) scope, and other included files?
 
It's supposed to be immutable I think
 
it's not
 
@samaYo Yes, you can do that.
 
Anonymous
4:01 PM
pray tell
 
posted on May 29, 2015 by kbironneau

/* by da]v[ax */

 
4:24 PM
@samaYo Why not use $_ENV? You can do it with that
 
is it possible to make service provider in PHP?
 
yes
 
any example @AlmaDo
 
example
 
4:40 PM
$provider->provide('service');
 
@DanLugg i say any implemented system example?
 
4:52 PM
hi, in PHPunit what is D inside ...D.....
E = error
 
Good morning
 
I'm getting interesting bitwise results on codepad's 5.6.8; bug in a source build they did? codepad.viper-7.com/13iL7K/5.6.8
8
Like, I don't see how that it's completely wrong that it returns false
 
@Worf ?
 
Guys
I am planning to do that diploma
Is it worth it?
I will not leave school, will do it with A/L
 
5:02 PM
@DaveRandom sorry, i didn't understand you. was referring to pdo triggering errors and throwing exceptions at the same time
 
Anonymous
@HassanAlthaf how much is it in usd
 
Its approximately $275
let me get the exact value
 
@Worf It does?
 
yeah
 
@DanLugg How the fuck did you do that?
 
5:04 PM
$257 @samaYo
 
@Worf How? Just using $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)?
Never seen that, just works afaik...
 
* @link https://bugs.php.net/bug.php?id=63812
* @link https://bugs.php.net/bug.php?id=53185
* @link https://bugs.php.net/bug.php?id=52414
 
@DaveRandom no idea, 1&1===1 last I checked
 
Anonymous
@HassanAlthaf I would say yes in that price range. But find the most reputable institution and the diploma will have a better value.
 
@DanLugg You know what I'm referring to :-P
 
5:06 PM
@samaYo that is the best institute in my country which issues diplomas.
 
@DaveRandom check the source :-P
In the head
 
Other institutes only do degrees. I am planning to do BSc in CS after A/L @samaYo
 
 
@HassanAlthaf do it :)
 
@DanLugg Yeh, don't get how you managed to do that, I can see the <meta> but can't see how you injected it
 
5:07 PM
@MarcelBurkhard do what? ;) kidding a'ight.
 
@DaveRandom That page is actually the output frame page of codepad, I just recycled their own page markup into the output and dropped the meta in.
 
@DanLugg ahhhh right
 
@HassanAlthaf I think it will help you find a job, because people might not take your application serious otherwise, because of your age
and other than that you learn stuff which is always nice
 
@DaveRandom Not bad ;-)
 
@Worf oic it's generated by mysqlnd. I guess mysqlnd needs the ability to set a custom error handler callback internally to fix that, that a huge job to fix (I've looked into nd before when trying to add an async connect and sane way to expose the underlying socket as a stream so you can select()/kqueue()/epoll() it from userland. It's fixable but the challenge will be to find someone who can put the time in.
nd really needs a huge refactor, as does PDO
 
Anonymous
5:12 PM
@HassanAlthaf I would say, do it .. specially for $257 it seems a good deal. IF you don't have a better alternative. My only concern is the time. 6 months seems a bit long for a 72hours course. It's like an hour of course per 5 days ...
 
I'd really like to sort that out, I think it would be great if you could register custom (userland) PDO drivers as well, I'd really love to have a crack at it but it's literally weeks of work, and I mean weeks of full-time work
 
ahahahahah
 
PHP should support native XML literals and XPath/XQuery expressions.
 
Booom! Friday peoples
 
@DanLugg Actually that's the one and only thing I like about VB.net
 
5:20 PM
(<foo>bar</foo>)@/foo[1]/text() === 'bar';
 
I imagine that'd be really hard to parse
Although I must say I want JSON literals much more than that (and yes I know you can just (object)[...] but it's just not the same)
 
@DanLugg You are absolutely right in this being an unpopular opinion.
 
@NikiC (assuming from your tone you do not like it) why is it so unpopular?
@kelunik just for the record, disappointed with the lack of love for CILF
 
@DaveRandom hm?
 
Name for chat
 
5:32 PM
yay \o/ friday night bitches and bitchesses
 
E_WARNING Undefined variable bitchesses
 
@PeeHaa If you have some time, I could need someone to ping me in amp-chat.
 
Sure. To the ampchat mobile!
 
@NikiC goddamnit Zeev
 
6:10 PM
can anyone tell me if this .htaccess file would work for rewriting the url example.com:8443/public/blog
https://bet.interweb360.co.uk:8443/public/ <--- working
https://bet.interweb360.co.uk:8443/public/blog <---- not working
 
OK, so I want to create "objects", like car models for example where I can setup attributes for these. And maybe another object type named car windows, with different attributes and relations to the car models. Is there any plugin for this? Should be easy to query it to view.
Oh, and in Wordpress :) Forgot to tell you that
 
@tony.gustafsson You need to be more clear
 
OK, um, different type of THINGS with attributes, that can have relations between them. Like this car doors parent is this car model. Kind of easy to do with PHP and MySQL but I want it for Wordpress GUI this time
 
@PeeHaa do you have a moment to review my htaccess issue
@tony.gustafsson how would it be used?
 
Imo the only thing you would need is:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php
 
6:16 PM
@tony.gustafsson like are you trying to display your objects on a page?
 
@Stephen Wolfe: Yes
Maybe a list
maybe just one object with it's children
It should also support many-to-many-relations
 
@tony.gustafsson why not just create a database and access it vai that wordpress database manger
 
Stephen Wolfo: OK so there is an API for this? If I wanted to be able to edit my "things" in the GUI, I would have to write my own plugin then?
 
@PeeHaa ahh it didnt work
@tony.gustafsson ahh there are plugings out there for adding custom tables and fields to a database
@tony.gustafsson I dont know them of the top of my head but I have seen them on other sites
 
anybody knows how to getting http post response body using curl
 
6:19 PM
Stephen Wolfe: OK i've googled but i dont know what to search for really... "object" is a general word :)
 
@tony.gustafsson google something like custom database plugin
@tony.gustafsson or custom table maker plugin wordpress
@santosh did u look at php.net/manual/en/book.curl.php
 
Stephen, I will do that :) thanks
 
@PeeHaa think it could be a apcahe config issue?
@PeeHaa it works on my windows machine
 
Stephen, Yes, found it... the question is if it supports relations between tables.
So when is PHP7 coming out?
 
I think mid june
 
6:27 PM
first alpha will be June - final release won't be until late this year (obviously dependent on stability / issues)
 
According to the timeline, late Oct is when 7.0.0 should be out in the wild
Of course you're always welcome to pull the source and take your life into your own hands compile your own
 
ah nice... :)
no pre-alpha for my part :)
I wish they would rename many of their functions... -_-
screw the backwards compability
 
@tony.gustafsson Why would they rename functions? What is the gain?
 
@tony.gustafsson I know. mysql_query should be renamed to wtf_are_you_doing
 
Because some functions are named areallylongfunctionname() and some are named a_really_long_function_name()
and many functions chould be clumped together as one function with arguments, easely
 
6:35 PM
@tony.gustafsson And what do you think what happens when you rename those functions?
@tony.gustafsson Also no. Having functions do different things based on parameters is terrible
 
@PeeHaa: All bad programmers who have not learned the new names would upgrade and destroy the web :)
 
Nope you only introduce more confusion instead of fixing it
 
But all those backwardfunctions, that gives the same but in reverse order... I miss something like LINQ in PHP where you could just do list(array).reverse()
 
> But all those backwardfunctions, that gives the same but in reverse order.
Not sure what you mean by that :) You have an example for me?
Are you talking about an OOP interface?
 
Yes, sort() and rsort()
I guess only 5% differ in the C (?) code for these two functions, why should they have to be two different functions in PHP?
 
6:41 PM
I'm still not sure what you want :P You want to change the behavior of those functions by creating a single one with a param?
Also why would you care what the c code does?
 
It's just that if the functions are SO alike, maybe they should not be two functions?
 
They do differents thing of course they should be two functions
 
I would like a naming convension, fewer functions, and linq... and do things like myarray.filter(a=> a.age == 18).sort(a => a.name);
And dont get me started with == and === :P wtf
 
@tony.gustafsson So use C# (unfortunately)
 
I agree we have too many functions. I totally fail to see your reasoning why we have too many though
 
6:44 PM
@DanLugg: I am... but it sucks in so many other ways :) PHP is still more easy developed
I guess === is needed in an untyped languge like php or javascript
 
@tony.gustafsson Meh. I used to 9-to-5 C#, and 5-to-9 PHP. They're both awesomely terrible. C# however, sans-MS, is less terrible IMO. If, it's just that deploying applications with Mono is a PITA sometimes.
 
@DanLugg: Same situation here, without the mono :)
Were there SOME support for typed variables in PHP7 or have I dreamt it?
 
@tony.gustafsson Scalar Type Hints
 
@tony.gustafsson No not really no
 
Does anyone know if port numbers effect url rewriting?
 
6:53 PM
You mean using a non-standard port?
 
yeah
I am just using this atm
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
but my site is on example.com:8443
 
Man... I hate googling for something (scalar type hints), reading 10 pages or so, and still just got a vague feeling of what's it's about.
 
bah, tricked by people using @stephen instead of @StephenWolfe
 
Is it like hinting for the IDE which kind of attributes the method wants?
 
@Stephen has it happened again lol
 
6:56 PM
@Stephen Yeah chat pings are annoying like that :(
 
@Machavity yeah
 
quite. its worse because i clearly wasn't part of the conversation before.. not exactly the most intuitive of chat systems :(
 
@StephenWolfe I've never messed with it on a non-standard but I would assume it would only apply if you redirecting to another site
 
ahh damit
 
Ah found it... sounds great to be able to declare the type for the attribute.
 
6:58 PM
@Stephen It's a lot worse if your name is Oli
 
I guess it's like function(bool enabled, string name) {}?
oh forgot the $s :)
 
@Machavity heh i bet.
 

« first day (1686 days earlier)      last day (3262 days later) »