« first day (2386 days earlier)      last day (2558 days later) » 

Wes
how about autoloading?
does that invoke it?
 
@Andrea are you here still? :o
 
@Hello unfortunately :p
@Wes yep, says as much
 
Wes
sorry, lazy mode, didn't read it :B
 
it basically does exactly what you would expect
the implementation was super simple ^^
 
Wes
12:22 AM
i remember there is that functionality already, like in zend parse arguments
 
im having trouble sorting the array in a-z
can I call asort on the list?
 
@Hello I… think so?
@Wes oh hmm
 
Wes
iirc it's zend_parse_arguments("C", ...)
 
yep
found the code now
hmm, I think it doesn't care whether the class is an interface or trait
maybe I should do tha
 
12:46 AM
why is my radio button column acting wierd ???
$results=mysqli_query($conn,$sqlbook);
while ($dat=mysqli_fetch_assoc($results)){

//echo "<h2>Uid :</h2>".$dat['uid'];

echo "<tr>";

echo "<td> <input type='radio'> </td>";
echo "<td>".$dat['sellername']."</td>";
echo "<td>".$dat['bookname']."</td>";
echo "<td>".$dat['author']."</td>";
echo "<td>".$dat['bkdetails']."</td>";
echo "<td>".$dat['bkcondition']."</td>";
echo "<td>".$dat['bkprice']."</td>";


echo "</tr>";
hey @Danack watsup man how you been ?
 
Wes
1:30 AM
@pmmaga i swear i searched it yesterday, but i've found it only now :B php.net/manual/en/reflectionclass.gettraitaliases.php
 
Hi guys can you enlighten me how was finger print works on web the concept only and connect to db as well?
 
 
3 hours later…
4:03 AM
Morning
o/
 
hi
 
hello hello!
:p
 
LOL
:D
 
salut
hello
 
o/
 
4:15 AM
\o
 
What's going on?
At work?
 
absolutely nothing
but after tonight 11 days of vacation for me
\o/
 
Wow sounds amazing!
 
Enjoy every moment of that
 
What's plan for 11 days??? O_o
 
4:18 AM
I have a friend coming to visit me so I guess I'll be a tour guide for 11 days ;)
what about you guys ? what's new ?
 
finals in a week lol
Not fun
 
Nothing much ! I Will be launching PHP5.6 site in PHP 7.0 for next few days! :DS
 
hahaha
 
4:24 AM
I just finished reading Elon Musk biography
it was awesome
 
cool
 
this guy is crazy
I think I can send this book with audible for free to anyone
if someone here is interrested ;)
 
how long is it?
 
@Valentincognito You can mail me or put somewhere so I can download!
 
4:34 AM
I have to email it @Akshay
got it
you can remove it from the chat ;)
 
Thanks dude
 
@Akshay No problem, it's on the way !
 
@Valentincognito enjoy your mini vacation ! cya!
 
thanks !
 
I'm trying to sort my text file in alphabetical order ascending and descending, by clicking on those hyperlinks to update the page
https://puu.sh/vyAVj/973392bb1d.png
anyone know how to reindex an array with a file? Should I use array_values?
would I just hyperlink to a php page with the code for each link? or am I complicating this..
 
4:50 AM
how do you get your data in the first place ?
 
$file = file("comments.txt");
 
yeah this is the form
it gets saved into comma separated values
i guess im just confused as to how I would reindex the array
 
$file = file("comments.txt"); is not a very good idea
 
it isnt?
:o
 
4:54 AM
no.. I don't know what your level if programming is but this is not recommended
if you want to persist data you have 2 choices. 1: saving your data in a database or 2: saving your data in a file but not a txt file you won't be able to get anything done with this method you should at least use a json file instead
 
not that much with php at least, this is my firrst class
well, for the second part of this assignment we are supposed to do this with a database
but for the first half we need to do it with a file.. D:
 
aren't you allowed to use a JSON file ?
that would be odd
 
I figured I could just call asort() on file()
hmm I cant use anything with javascript sadly
 
what about SQLite ?
 
TA said to look up how to reindex an array
Nope not right now
just php
anything in php
 
4:58 AM
okay
weird but anyway asort() should work then
it doesn't ?
 
asort($file) = file("comments.txt") ?
or $file = asort(file("comments.txt"));
 
it depends how the content of your .txt looks like
 
just comma separated values for name email and comment
but if I want to sort by name, I think I would have to check for the first index of each line
right?
 
wait give me a sec
sorry a customer called
 
no problem Sir
 
5:05 AM
hum I am not sure how we can make this working
because
the outpout of your current file will be something like: Array ( [0] => hello, boom, ads [1] => hey, kids, okok )
and every line is an entry of your array
 
if (file_exists("comments.txt")) {
    $file = file("comments.txt");
    foreach ($file as $line) {
        list($name,$email,$comment) = explode(",", $line);
        echo "Name: ";
        echo "<a href=mailto:\"", htmlspecialchars($email), "\">", htmlspecialchars($name), "</a>";
        echo "<br>Comments:" . "  ". nl2br(htmlspecialchars($comment));
        echo "<hr>";
    }
} else {
    echo "File does not exist!";
}
 
you might have to explode() the result of it
 
yea
 
ah yeah
 
that is how I am displaying each line of the file
 
5:08 AM
hum
I am thinking
what about you push the result of your list into a new array with a key and a value ?
 
and then your order by specifi key ?
monring linus
 
yo
 
hmm
 
posted on April 28, 2017

New Cyanide and Happiness Comic

 
5:25 AM
@Hello hum ? ^^
you see what I mean ?
 
I dont :o
 
I can write it for ya
if you want
 
make a variable get the result of the list explosion?
that would be nice, im just confused
 
$file = file('comments.txt');

$array = array();
$i = 0;
foreach ($file as $line) {
  list($name,$email) = explode(",", $line);

  $array[$i]['name'] = $name;
  $array[$i]['email'] = $email;

  $i++;
}

usort($array, function($a, $b) {
    return $a['name'] <=> $b['name'];
});

print_r($array); // this array would be ordered by name
 
:O
Interesting sir
That usort() code is confusing to me, can you explain that part? thanks
and is there any way to make it so that the code executes on the same page when the link is clicked, or do I have to hyperlink to another page and show the changes?
 
5:33 AM
in the usort the spaceship operator confuses you ?
 
LOL, yea the spaceship
 
its the same as
usort($myArray, function($a, $b) {
    return $a['order'] - $b['order'];
});
 
ohh
 
you said earlier no javascript right ?
for the link if you want to update the data dynamically you have to use javascript
 
ahh
okay, well in that case ill just make another page
 
5:36 AM
otherwise your a condemned to be using another page yeah
 
I see, yeah id like to use javascript (im better with it)
 
or
you can use the same page also but you have to refresh
your link could be as follow: <a href="yourpage?sort=name"
and then if($_GET['sort']) { your code..
 
ahh
gotcha..
I would rather use js :D
haha
 
js would not bring a lot to your project for this little test case
 
cant wait to use a database lol
 
5:40 AM
you understand the $_GET var right ?
 
yeah I do
 
I use $_POST a lot
 
    Am I doing it wrong?

    ErrorException in UserCan.php line 21:
    Undefined property: App\Http\Controllers\TaskListController::$canRead

    trait UserCan {
         public function resolve(Request $request, Route $route)
	{
		list($controller,  $method) = explode('@', $route->getActionName());
		if($request->user_role === 'coworker') {
			foreach($this->actions as $action => $value) {
				if(is_array($value) && in_array($method, $value)) {
					$this->{$action};
				} else if($value === $method) {
 
Not in that trait...
 
5:48 AM
@Orangepill ?
 
@Valentincognito I would like to say thank you very much for your help, Sir
 
     public function canRead()
	{
		       dd('reading');
	}
@Orangepill canRead method does exists there..
 
@Hello Well I am not sure this is the most elegant solution but I am glad if I helped !
 
Its allright 😃 I will work on this and try to imrpove it
 
it should be $controller->canRead() <-- with the parens
 
5:50 AM
@Orangepill :D ah thanks
forgot parenthesis :p
 
6:11 AM
'nin
 
morning
 
morning Joe
 
\o
!!friday
 
o/
 
6:20 AM
lol
 
6:49 AM
mornin
 
mornin tereško
 
any ideas whats the conccept of bioemtrics?
saving generated key on the database
then register 1 finger 5 times something like that?
 
http://php.net/manual/en/function.flock.php
Note:
Because flock() requires a file pointer, you may have to use a special lock file to protect access to a file that you intend to truncate by opening it in write mode (with a "w" or "w+" argument to fopen()).

What does it mean? What happens if I lock the file itself?
 
@MarcelBurkhard If you open in write mode and want to use that handle for locking, your file already has been truncated by open.
 
Mornininiiininiininininings
 
7:04 AM
@RonniSkansing o/
 
just closing some (very) old open chrome tabs, I came across a Google search results page for "unicode cock and balls emoji"
moin
 
\o @kelunik
 
@DaveRandom lol
 
7:22 AM
@RonniSkansing o/
 
@_DaveRandom WE HAVE THE TECHNOLOGY ⚽🐓⚾
 
hahah
 
Hey o/ Linus
 
7:41 AM
mornin
 
mornin Ekin
 
hi
anyone develop pass wallet api in php
for apple
 
@Andrea Do we even need an extra classlike? you really just need class (can be instantiated) and class+interface (can be instanceof), right?
 
8:03 AM
@bwoebi so abstract class doesn't pass class?
We just need class IMO.
 
0
Q: How to auto load page/div using jquery ajax to the data within foreach loop?

metalhead101Till now I am stuck with these code here the code for ajax I know This is wrong ..or something is not right .. <script> $(document).ready(function() { $.ajaxSetup({ cache: false }); setInterval(function() { $('#divToRefresh').load('userCount.php', function(data) { ...

please help
anyone
 
8:28 AM
moin
 
morning @Sean
o/
 
\o
Had two people tell me I look tired this morning ._.;
 
I dont think you look tired sir
 
@bwoebi any idea what the reason could be for github.com/krakjoe/apcu/issues/245
 
@staabm Is it possible for you to run it with valgrind? (and obviously USE_ZEND_ALLOC=0)?
 
8:39 AM
@bwoebi I guess running it via valgrind will make the production system ver slow?
(never did things like this)
 
@staabm oh, well, not on production
 
@Andrea I don't like the class/interface/classlike split
As already discussed, it's a pretty useless distinction, but increases complexity a lot
Also, I do think it's worth considering to use the same type as Hack ;)
Which I think happens to also be more expression, as what you get is indeed a classname
 
stop flagging
 
who is falgged?
 
Happy Rebecca Day!!
 
8:51 AM
@Smple_V This isn't a debugging service. Asking repeatedly, "why isn't my code working" is likely to make people not want to talk to you.
@SammyK Do you work for Facebook? And is it worth using github.com/facebook/php-graph-sdk over a generic Oauth library?
 
Anonymous
mornin
 
@Danack can I ask you a question?
 
You mean ask a second question ba-dum-tish, yeah go for it.
 
@Danack why isn't my code working?
 
....because programming is shit.
 
9:00 AM
I liked the previous explanation better lol
 
@NikiC It might not even be possible, or does it invoke autoloading?
@bwoebi @Trowski I think we should have cards on the landing page like this with features which make Amp interesting. /cc @wes
 
9:15 AM
Why is it more than double the cost to get PHPStorm under a commercial license vs. an individual one?
 
Anonymous
you look tired @Sean.
 
@DaveRandom I found the issue... it came to me in a dream... after all that tweaking of settings yesterday...
root@5394e84367b0:/var/www/html# php -m | grep cache
memcached
 
@Leigh specifically what about it? :-S
 
opcache isn't even installed...
so it doesn't matter what the settings were
 
Ohhh right :-P
I thought you meant there was some issue with memcache
 
9:19 AM
@JayIsTooCommon Tired of your shit :P
 
Anonymous
:D
 
hah no, but I didn't anticipate the official php docker image not having opcache on by default :/
 
@Sean Because commercial enterprises can afford it (price break for individuals), and they get an SLA for their money
youtrack-support.jetbrains.com/hc/en-us/articles/… tbh not much of an SLA anyway, but businesses need a document to point to
 
K buying a SC ticket today I think
 
@Leigh yeh that is weird but not unsurprising to me, some people seem to hate it for (apparently) no good reason
@Sean coolio
 
Wes
9:25 AM
morninsddgdgfyogjierwrg
 
Anonymous
jo jes
 
Ed Balls
 
I hope you are still here. - "I kind of faded out in the middle, but I'm back now."
 
Anonymous
> But I consider myself pretty dumb person, so there is high possiblity that I am,
doing something wrong or seeing this in wrong light.

I am not personally confident about my approach either, but I honestly do
believe, that overall concept is pretty sound.

As I am no wizard coder either, I would be very grateful for reviewers
 
@kelunik well the proposal does.
 
9:39 AM
@JayIsTooCommon I have coded wizards before, they are hard
 
Anonymous
were you expecting soft?
 
Well most of them are old, but I suppose they have magic as well
 
9:53 AM
@kelunik LGTM.
 
10:07 AM
Guess when opcache was deployed :P \o/
 
@Leigh looks pretty weak tbh
Little code?
 
Nah, Laravel based
 
Hm, in that case I would've expected a much larger difference
 
A bunch of it is io bound wait
 
10:21 AM
@Leigh conclusion: OPCache is worthless. Just use Laravel.
 
@Gordon I'm slowly removing laravel :P
 
Hi any idea why inside phpmyadmin designer does not show anything?
Currently it says unknown, what could be the cause of this
 
@bwoebi invoke autoloading?
 
@kelunik yes
I realized today that I like FAST_ZPP API much more than the old zpp() …
 
10:31 AM
@bwoebi heretic
 
@NikiC why? it allows me to declare my own macros on top of the existing ones
 
moar macros… yay \o/
I hate macros… they make for very unreadable code imo… but I guess that's a non-argument when one uses C to start with
 
        php_uv_t *uv;

        ZEND_PARSE_PARAMETERS(1, 1)
                UV_PARAM_OBJ(uv, php_uv_t, uv_signal_ce)
        ZEND_PARSE_PARAMETERS_END();
It converts my object nicely into the correct representation
@Gordon stop reading gcc -E output instead of the actual code…
 
@bwoebi okay, that is an actual advantage
 
@NikiC I have no idea what he refers to…
 
10:37 AM
Probably
> Simply execute the aerys binary (with PHP 7)
 
@Leigh yeah, should be executable actually
 
10:59 AM
@Ekin lol
 
Anonymous
!!wotd
 
drupe: any fruit, as a peach, cherry, plum, etc., consisting of an outer skin, a usually pulpy and succulent middle layer, and a hard and woody inner shell usually enclosing a single seed.
 
> You Can't Log In Right Now
Thanks for sending your photo. We'll email you within 72 hours if it meets our requirements.
At the moment, your account has been disabled as a security precaution.
Well, I guess I'll debug that Facebook bug in 72 hours.
 
Wes
@NikiC did you read my thoughts about how it's confusing having mutable stuff and arrays at the same time? :B
 
@bwoebi How stable is the Artax Ampv2 branch? Is it something people should be looking to use in production now, or is it going to be updated to reflect the changes in the underlying Amp library?
 
11:14 AM
@Danack Not stable, not stable at all.
It's probably the most unstable thing we currently have.
 
thanks.
 
Streaming will change and other things.
@Danack But just as anything: If you use dev versions in production, pin specific commits.
 
Anonymous
 
lol
you selected new challenge?
 
@Wes no
where?
 
Anonymous
:)
 
Anonymous
@Linus if you have time or want to work on something (for learning purposes) let me know. I'm looking for someone to help out with fastpress
 
Anonymous
11:41 AM
That goes for @Tiffany and @Shafizadeh as well :)
 
@samayo ok will talk later tonight will ping you.
 
Anonymous
great!!
 
:)
 
Anonymous
@Gordon That was funny as hell. But then again, who actually thought he was doing it for the right reasons? Not me.
 
Anonymous
He just wanted something huuuge to compliment his ego.
 
11:44 AM
@samayo I guess that's the problem with everyone, nobody thought he would be president, and now the cunt actually is..
what intrests me the most is how he is going to handle the asian Korean situation..
 
Wes
@NikiC basically, it's confusing that arrays need to get updated back in the holder, while objects obviously don't need that. i don't have a preference on mutable/immutable apis, but it's confusing having both at the same time. what i'm asking, is if you considered switching to mutable collections (arrayobject perhaps?) in place of arrays
 
Anonymous
@Naruto Yeah, same here. Let's just hope there won't be any wars.
 
Wes
$class->stmts = change($class->stmts); // needs to update back
change($methodNode) // no need to update back to the holder of $methodNode
@NikiC
obviously the problem is only about arrays, as strings are pretty much scalar and immutable
 
@Wes If you get phpstorm to implement good generics support
 
Wes
phpstorm?
 
11:52 AM
Otherwise object based collections are an api regression
 
Wes
they don't have to be typed?
@var Stmt[]|NodeList $stmts
this will do just fine
 
That's a lie
Do static analyzers support that lie?
 
Wes
it is?
 
That is, do they interpret this correctly as "it can't return an array"?
 
Wes
well the problem would be if it returned something that you didn't specify :P
if you specify something and you never return it, well, who cares
 
11:58 AM
I am working on an PHP library for an API, and this API has now migrated to a new version, so say version 1 and version 2. And I would like to keep v1 but also implement v2 into it and I wanted to know if any one have some samples or know some libraries like that so I can have some ideas on how I can switch between both structures and whatnot, like I have Models for each control but not sure how I would deploy selecting it based on the selected API version on my code
so I was looking for some examples towards it, if anyone know anything I can look at I would appreciate
 

« first day (2386 days earlier)      last day (2558 days later) »