« first day (1743 days earlier)      last day (3219 days later) » 
00:00 - 14:0014:00 - 00:00

12:00 AM
@Danack basically, the example with the injector is the first valid reason for factory classes I've seen, which basically is just hinting to an injector what factory we'd like to have.
@Danack normally you'd have a map what you'd like to have injected as arguments or so, at what point we could just inject normal callables....
 
@bwoebi Figure out how you were breaking that test?
 
@Trowski what are you referring to?
 
After you pushed the fix for returning a temporary from a typed generator, you said you had broken a test.
 
I seriously have absolutely no idea how that test got unbroken.
But well, it seems to be green now, so I don't worry too much about it^^
 
I love programming problems that fix themselves... usually come back to bite me. :-)
 
12:08 AM
@Trowski I hope it'll bite someone but not me :-D
 
hehe
 
that's what's nice about distributed development ^^
 
git push --force Screw you guys, not my problem!
 
sorry, php-src doesn't allow git push -f … (except for RMs I believe)
 
I know, it just made me think of that :-)
 
12:10 AM
Johannes gave me his phone number after I screwed some branch (master I think) up ^^
 
Yikes.
 
12:37 AM
Hi everyone, I have application where I load data from my MYSQL to an array, now i want to be able to load more when users perform something, basically append to my array as user scroll
I don't want my server to pull unnecessary result
How do I do this?
 
mus
hello everyone
0
Q: php set user agent while trying to get last redirect

karim naflawihello I have the following code : function get_redirect_url($url){ $redirect_url = null; $url_parts = @parse_url($url); if (!$url_parts) return false; if (!isset($url_parts['host'])) return false; //can't process relative URLs if (!isset($url_parts['pa...

look at this
I got planned wanted to help him but couldn't
 
1:24 AM
Wow, I just learned how much SO search sucks.
@BrianS It's called pagination (or probably what you're more specifically looking for infinite scroll pagination), which most PHP frameworks provide some facility for. I was trying to find a quality answer for you on SO, but apparently they all suck. Here's what I found on Google code.tutsplus.com/tutorials/… -- no idea how good/accurate that is, but looks pretty legit.
Hope it helps.
Maybe this one might be a bit less WordPress-esqueue though infotuts.com/ajax-infinite-scroll-using-jquery-php-mysql
 
1:44 AM
@Sherif Thanks I solve it, Just need to pass before count and new count into SQL and it would append. But thann you cause I was looking for the word pagination
 
@BrianS No problem, sometimes knowing what to look for goes a long way in filling in the blanks ;)
 
 
2 hours later…
3:41 AM
@bwoebi is phpdbg currently broken in 7beta2? I get the following error on compile:

sapi/phpdbg/.libs/phpdbg_cmd.o: In function `phpdbg_read_input':
phpdbg_cmd.c:(.text+0x28e0): undefined reference to `readline'
phpdbg_cmd.c:(.text+0x28f7): undefined reference to `add_history'
collect2: error: ld returned 1 exit status
make: *** [sapi/phpdbg/phpdbg] Error 1
 
@crypticツ Try make clean
 
4:49 AM
good morning
 
5:05 AM
@Orangepill Lies!
Dirty, filthy, ugly lies.
 
technically it's morning here .... and so far it's good
 
@Orangepill It's definitely morning, but I disagree with the good part.
 
I'm doing good... I'm going downhill off Ballmer's Peak
took me an embarassing amount of time to get the math right for this
 
5:25 AM
> Well method typehinting is pretty much same thing as just performing an instanceof check on each parameter
that's so silly
also, morning
 
morning
 
5:53 AM
morning. any good guide how to install the latest php7 (beta2) with apache?
 
6:18 AM
same as before, only mod_php7 is the name of the module
 
thanks @JoeWatkins i'm having trouble installing it manually. i'll try with this module name
 
 
1 hour later…
7:46 AM
@NikiC ping
 
8:14 AM
Morning
I have a question
How can I execute multiple statements using ternary operator ?
I'm trying to do something like this:
echo (mysqli_num_rows($result) == 0) ? ("<tr class='no_result'><td colspan='15'>No Results Found</td></tr>", return);
But the return command never executes
And gives me a parse error
 
Mornings
@ZahidSaeed that it not how ? works nor is it how return works
 
Morning:)
@RonniSkansing how do I do it then ?
 
What do you want to do?
if there are no results, then .. ?
 
Then exit
Cause I have a while loop under that code
And I don't wanna execute it if no results are found
Instead it should exit the function
 
if(mysqli_num_rows($result) === 0)  {
  echo 'no results';
  break;
}
 
8:24 AM
I know that
 
you break a loop to jump out of it.
 
How do I do it with ternary operator ?
 
why do you want to use the tenary for it?
 
I'm interested in it :P
I want to learn it
How is it done
 
Okay.. lets say you have $_GET value and you are not sure if has been set
 
8:27 AM
yes
 
$foo = isset($_GET['foo']) ? $_GET['foo'] : 'Foo will get this value if get[foo] is not set';
 
Yeah I already know that
But I have some questions
 
First what I don't have an else statement ?
I mean I don't wanna use the third part
that is the 'else' statment
@RonniSkansing how do I do it ?
 
I dont get it.
 
8:33 AM
if(isset($_GET['foo'])){
    # Do something
}
else{
    # I have nothing to execute here. I don't want an else statement :(
}
 
just remove the else { .. }
 
9:32 AM
@bwoebi Don't know yet :-)
Mornings
 
Anonymous
Morning
 
9:56 AM
morning niki, sorry, I'm such a shit ... I found answer I was looking for ...
we seem to treat get_method/call_method differently, I found the way to control caching but decided to remove the thing anyway, realizing this is probably the reason there is such a call overhead on threaded objects ...
controlling cache didn't seem to work reliably, but fuck debugging that, I'll just let zend cache ...
(didn't seem to work reliably when 16 threads are executing the same code 10,000 times)
 
@crypticツ might be that something's broken. I'd worked a lot on it the last days… Try master then.
@PeeHaa pfff ^^
 
@bwoebi Yeah sorry about that :)
Damnit I cannot come up with a name for a github organization that isn't taken :(
 
10:12 AM
@PeeHaa you're just not creative =P
 
Most likely. Every thing I try I get the nice
> Username is already taken
message
 
bob
pick your brain ?
 
@bwoebi Didn't you say you know latin? Can't you give me a cool looking name of which the actual meaning is not something stupid :)
 
can't live without one… can't give it you… but can help you ;-D
 
hehe
 
10:16 AM
@JoeWatkins so, what's up?
@PeeHaa ehm… what repos shall your organization contain?
 
I have a seemingly simple bit of code that crashes (pthreads) when I "use" parameters in a closure passed to ::synchronized
(used param is undefined, throws exceptions then crashes)
 
@bwoebi A set of php 7+ libraries / tools to build web things
 
@PeeHaa E_GENERIC
@PeeHaa also… why don't you just put the things in your repo and move when you know a name?
 
So routing, templating, request/response, token generation/va;idation etc
@bwoebi I don't want to rename stuff later :P
 
<?php
class Job extends Collectable {
	public function run() {
		$this->synchronized(function(){
			echo "Hello\n";
			$this->done = true;
			$this->notify();
		});
	}
}

class Test extends Thread {
	public function __construct(Worker $worker) {
		$this->worker = $worker;
	}

	public function run() {
		$j = new Job();
		$this->worker->stack($j);
		$j->synchronized(function() use($j) {
			while (!$j->done)
				$j->wait();
		});
	}
}

$worker = new Worker();
$worker->start();
$j = new Job();
$worker->stack($j);
but this in the Thread:
$j->synchronized(function($j) {
			while (!$j->done)
				$j->wait();
		}, $j);
everything works
<?php
class Test extends Thread {
	public function run() {
		$value = new stdClass;
		$closure = function() use($value) {
			var_dump($value);
		};
		$closure();
	}
}
$test = new Test();
$test->start();
$test->join();
?>
 
10:21 AM
so, something goes wrong when copying the statics?
 
no crash but value is NULL
aaah
 
?
 
I didn't know use'd stuff was in statics ... should be simple ...
omg, don't tell anyone used variables are considered static ...
does statics table use string keys ?
 
@JoeWatkins looks like it does.
(zend_compile_static_var_common)
@JoeWatkins well, it's static, but a read fetch only, so immutable as long as not by_ref.
 
morning
 
10:34 AM
why would it be IS_LONG ?
I smell magic
 
@JoeWatkins pong
 
47 mins ago, by Joe Watkins
morning niki, sorry, I'm such a shit ... I found answer I was looking for ...
sorry about that ... again ...
 
lol, don't be sorry ^^
 
Heh @NikiC aren't we all a tiny bit disappointed when someone pings for help and then tells you aren't needed?^^
 
Is there something wrong with GitHub by any chance?
 
10:49 AM
It's slow on some requests I have noticed
 
/me is winning
 
@JoeWatkins Joe 1 : 0 Code ? :-D
 
@ziGi Think there's a disturbance in some CDN networks...a couple of sites have been slow today.
 
11:06 AM
\o/ After 1000 attempts I have found a name that wasn't taken yet! github.com/CodeCollab
 
Morning guys
has anyone used SplClassLoader.php? I am getting an error after the use statement.
 
Is that part of composer's autoloading process?
 
What is the error?
 
it says expected statement
 
11:10 AM
That is not what it says
 
thats what it says.
no explaination..I am using phpstorm ide.
 
Uhhhhmmm are you manually editing that file?
 
well, i didnt get it.
 
You didn't get what?
 
require __DIR__ . '/../../../SplClassLoader.php';

$oClassLoader = new \SplClassLoader('Example', __DIR__ . '/../src');
$oClassLoader->register();

use Example\Something\Service\SomethingServiceInterface;
thats what I am doing.
and just after that use statement it shows error.
 
11:16 AM
Why don't you just use composer's autoloader?
Also without the actual error message I feel like wasting time
 
Actually this is my first time using this class
In the ide it just says 'expected statement'
 
Have you tried running the code?
 
yes, it cant run
it says parse error
 
sigh
PHP doesn't just say "parse error"
 
ThW
morning
 
11:19 AM
Hey @ThW o/
 
Parse error: parse error in /Users/naveenkumarvasudevan/Downloads/test/src/Example/Something/Service/Somethi‌​ngService.php on line 12
thats what I get in command line
When you say using composers autoloader, do you mean bootstrap.php?
 
@mad_programmer That error message point to an error in another file
 
ah sorry my bad..I edited it
any idea?
 
4 mins ago, by PeeHaa
@mad_programmer That error message point to an error in another file
 
@PeeHaa you were right, and I made the edit.
Parse error: parse error in /Users/naveenkumarvasudevan/Downloads/test/src/Example/Something/Service/Somethi‌​‌​ngService.php on line 12
 
11:26 AM
Well what is on lines 11 - 13?
 
yes and that is where use statement is
13 is blank line
before the class declaration
which is on line 14
 
Well either you are not sharing your actual code or you didn't share all related code
 
I am not able to understand what you are saying? I have a folder structure
I have a file in that ...SomethingService.php
 
I am saying that the code you posted doesn't contain said parse error and as such there is no way to help you
 
good mornings
 
11:30 AM
Mornings
 
@PeeHaa when you said using composers autoloader what does it mean? could you explain that
I have a bootstrap.php in tests folder which is for testing
 
next puzzle @bwoebi @NikiC
<?php
class Test extends Thread {
	public function __construct($value) {
		$this->value = $value;
		if (Thread::getCurrentThread()) {
			printf("IN CTOR");
		}
	}

	public function run() {
		$child =
			new Test($this->value);
		var_dump($child);
	}

	public $value;
}

$test = new Test(new stdClass);
$test->start();
$test->join();
?>
the ctor is not called in the thread ... must be copying something wrong ?
damn it ... I found the answer already ...
sizeof()-1
 
@Danack ah yes
 
11:47 AM
Morning
 
Check GitHub
 
lol yeap. That sure looks drunk :)
 
3v4l.org says "This is an error 402 You have reached your limit for now, find another free service to abuse". I am cry.
 
@Danack yeah, I'm working on it
 
\o/
 
12:02 PM
yesterday brought me a slovenian asshole that has been submitting crap the whole day
 
You getting DDosed?
 
sort of, I can take most of the load
 
@Sjon if east of germany show captcha
 
but its an impossible balance between being fast&nice but fend of idiots
@PeeHaa hehe; yeah; I've been blocking ~5 ranges already
 
west germany mind you :P
@Sjon :)
 
12:03 PM
it sucks and it makes me a bit mad
 
Yeah. Pretty much impossible to prevent it too :(
What kind of machine does it need to run on?
 
@Danack; what does your IP start with?
 
@JoeWatkins btw is there any decent tutorial explaining how to use pthreads? the examples in the manual leave a lot to be wishing
 
2.96.91.109 but please don't worry about fixing it specially for me - I was just being lazy.
Not using it for a serious use.
 
@PeeHaa it has been running on a very small vps for a long time. But the amount of versions is becoming a challenge
 
12:06 PM
I suspect a lot of people only look at one or two versions output....
 
@Danack; you can switch to 3v4l.org/quick/5.6.11 instead
.. after I tweak the limit
 
@Gordon s/wishing/desired
 
that's weird, you're nowhere near the limit
@Danack still getting that error?
 
@Sjon On the quick link I get:
This is an error 404

There are `0` results

Basic_EntitySet_NoSingleResultException
And still the 402 on the main page.
 
@Sjon Well if it can run on a smallish box I suppose I could fork over some cash to get you an extra box. Can you codebase handle distribution?
 
12:11 PM
@Gordon well the examples in the manual are only meant to illustrate the usage of each method, the kind of educational material you are looking for doesn't really belong there, and I haven't written any ...
this was pointed out to me, that I seem to assume knowledge, which I guess php programmers in general don't have ...
intend to do something about it ... but it was only pointed out a week ago ...
 
@PeeHaa Yeah it's prepared for that.
 
What kind of specs am I looking at?
 
I haven't decided if I should introduce some sort of subscription or keep paying everything myself
 
I like it being a free service, but I can see it gets annoying having to support it yourself :)
Do you have ads on the thing?
 
nope; but I've had gittip and bitcoin links resulting in almost $ 50 now :P
 
12:18 PM
General ads would be annoying.....getting sponsored by a company like Jetbrains would be far less intrusive.
 
@Danack I can't see that PHPStorm ad anymore ^^
 
Also it might be worth it to ping some big hoster asking for a box. I have seen them do if for a lot less useful services @Sjon
 
@Sjon Do you mind if I point twitter.com/geeh to you? He just started working as Jetbrains dev relations guy.
And yeah - a hosting company would be a good sponsor also.
However, you can’t say artisanal without saying anal.
/told to tone it down in 3...2....1....
 
@Danack sure, that might work. Not sure if they have any reason to help; but who knows....
 
Pretty sure they already spend a hefty sum on web adverts.....which is basically pissing money away. Having a channel that gets in front of developers eyeballs is far more cost effective for them...
 
12:24 PM
@PeeHaa if you want to donate that'd be great; I have a dutch bank-account so it's pretty easy. If I get more spikes like yesterday I'll look into getting extra hardware for it; otherwise it's for beer/pizza ;)
 
There is no more noble a cause than that.
 
@Sjon I could also just donate you an entire box :-)
Well one of those fake virtual boxes anyway :P
 
Has anyone installed mac os in VM and actually developed with xcode?
 
Nope. I bought an actual macbook because I don't like pain
 
@PeeHaa I could do that, however, it would be waste of money. :)
 
12:29 PM
@PeeHaa hmm, that's interesting as well; I need to think about that. Thanks for the offer
 
np
 
@Danack could you check for the 402?
nice
 
@Sjon Yep, both work.
 
great success! #borat
 
12:34 PM
brb going to get booze
Dear community. Could everybody please use this as standard to declare strict types?https://github.com/CodeCollab/I18n/blob/master/src/FileTranslator.php#L1 kthxbye #php7 #dontwanttochange
There it is a standard now
Comply or GTFO! :P
 
@PeeHaa I use that as well
 
@PeeHaa That might cause a problem if/when we have more declares...
 
Jesus can't you just be happy for me...
:P
 
@Danack Why would that be a problem?
 
<?php declare(strict_types=1);
declare(somethingelse=1);
My OCD hurts!
 
12:39 PM
<?php declare(strict_types=1, somethingelse=1);
better? :-)
 
@PeeHaa impossible. I put the namespace in the first line.
 
@PeeHaa ....apart from the alphabetical mis-ordering.
 
:D
@Gordon /me booooos
 
so whoever invented it made it broken by design. nice.
 
12:44 PM
friends I need Some help
i get full friends list from facebook using graph API its value store echo variable. now how to call my php echo variable in html code?
 
@PeeHaa just don't use strict types and all your problems are solved.
 
@bwoebi I still cannot believe you are still so against it
It's actually pretty ok for most things
 
@PeeHaa I have no problem with strict types as long as I don't have to fix strict types induced failures.
 
Meh I don't give a shit about your problems :P
:D
 
how to add user roles drop down in registration in wordpress anyone know please
hi @PeeHaa
 
12:54 PM
=]
 
H S
hi all, how should I proceed with creating a api in php for my website?
can anybody tell how they started, some good resources , or things to take care off?
 
which api do you want
 
H S
i need to create api for my applicaiton. Simple CRUD api.
 
H S
these are directly making the server query.
I am talking about creating an api.
How should I start one. I researched some, but am still confused. Let me post some links.
Something lke this
 
1:10 PM
its the big process to say
@HS
 
@madu get rid of that link (the phppot one)....
outdated extension + possible sql injections aren't be best things ;)
 
H S
ok. I did some poc myself. In the server, I created one api.php file. This file would accept get request. I would request the link like api.php?funtion=getAllUsers. Then I would get a json containing all users.
but there are things to take care like csrf tokens, and many other stuff.
 
you can replace msql to sqli know @Rangad
i showed how the crud would be @Rangad
 
H S
So is the way I am proceeding wrong ??? @madu @Rangad
 
if you want api
you should use json
functions
and class
if you use json
you application could be restful because iphone and android support json
we can call using pointers
in php
if they want apps
 
1:16 PM
@madu Someone will see that link and will copy the code. Best case scenario: His site will stop functioning as the mysql extension is deprecated and removed in php7, worst case...someone figures out that the code is vulnerable and does something with it.
 
do you know online server supports mysql too
in dedicated server also
but in xampp it wont work
 
what?
 
H S
I will use angular framework in frontend. I would make ajax http calls to server files. But how should the api be created in backend. But I wanted to do it in more professional way, taking care of security and all that stuff.
Everybody knows mysql is deprecated in php @Rangad...
Is the way I am doing it ... like making one api file and making get requests to it.... is it right step?
If anybody could refer me book name... it would be good too.
 
0
Q: Angularjs and PHP for CRUD operations

Miguel_VelazkezI have tried to look for tutorials on this but nothing simple and to the point... Could anyone give me an example or link me to a tutorial on how to post data with angularjs to a php page? And also with angularjs call a php file to get data in order to display a list of lets say a phonebook. ...

@HS
slim framework is usefull
@HS
 
H S
Is it so? ok
 
1:29 PM
DO YOU KNOW WORDPRESS @HS
 
H S
It is not useful for my web application. I dont want to go wordpress way. I already have an application in html + php. I am revamping it .
Word press is more for blogs and that stuff. Adding plugins for all things... I dont have much idea about it
 
OK @HS
I AM WORKING ON WORKING
I WANT A USER ROLES DROP
DOWN IN REGSITRATION
 
H S
ok
 
SO THEY CAN REGISTER WITH HIS ROLE
 
H S
ok .. so ? what is problem
 
1:32 PM
 
??
@HS i am working on job portal
 
H S
ok
Good
 
in registration i want to a drop down like admin and editor
after he/she selected
he should register in that role
i searched so many tutorials
but i cant find
is it hard
 
H S
why do u want tutorial for adding dropdown in registration page?
I mean, where r u struck at?
Tell the specific problem
 
ok
i have in registration first,last name,email,password
then i want to add drop down with user roles
but i tried custom fileds
for that
not working
i want the form with first.last.email,password,user roles dropdown
inregistration
in wordpress
 
H S
1:44 PM
I dont have much idea about wordpress
 
00:00 - 14:0014:00 - 00:00

« first day (1743 days earlier)      last day (3219 days later) »