« first day (2071 days earlier)      last day (2893 days later) » 

12:37 AM
Is it possible to hide the source code in file so it becomes unreadable by user but can be executed by PHP Server?
 
@AbrarAhmed ioncube, but ultimately no, not in a foolproof way
 
@BillSchaller Thank you! :)
 
 
3 hours later…
Wes
3:25 AM
mornings hodor
!!rebecca
 
4:09 AM
Moin!
Anybody here plays FIFA 16?
 
Wes
not me :B i only like international football
'coz our major league championship is shit now
 
Wes
yeah could've died :B
 
why did you swallow an ice cube in the first place?
 
Wes
was drinking some fruit juice and i accidentally swallowed a piece of ice cube
 
4:14 AM
...
 
Wes
big enough to stick to my throat, small enough to pass unnoticed
 
ha, good to hear that you are fine now....
 
Wes
you can laugh, since i'm not dead :B
went way worse than that
because i panicked hard
 
Just downloaded FIFA 16, and tried out the online FUT... lost 4 - nil... :'(
 
Wes
lol
last fifa i played was fifa 1998
:B
 
4:17 AM
you must be really old...
 
Wes
yes indeed. 30 today
 
well, happy birthday then, mate!
 
Wes
thanks. 30 years wasted, to be noted :B
 
:P
 
Wes
nah, don't star it
 
4:19 AM
k...
 
Wes
it only reminds me how much i suck :B
 
...
 
Wes
i'm waiting for joe to wake up
 
:P
 
Wes
i'm very much struggling with some php shit
 
4:20 AM
5:20 AM there...
i see...
anyways, afk for a while, homework and stuffs...
 
Wes
there? aren't you from uk too? i already forgot...
later!
 
Wes
4:39 AM
so, found the bug
i will now complain about it
 
4:50 AM
morning
 
Wes
this the bug, though 3v4l.org/tjsrT but maybe it's intentional
hey Sergey \o
 
Hey Wes, how's your throat experience? :)
 
Wes
rofl
was a pretty serious moment
 
I'm sure it was
glad to see you complaining here again :)))
 
Wes
change this! change that! this no worky! booo
man, imagine me suffocating while waiting for the water to get hot in the microwave
 
4:55 AM
damn.. Multi catch RFC passed, but union types do not....
@Wes one of my greatest fears actually, to stop/be unable to breathe
 
Wes
also typed props is failing
 
now death by ice cube is in the list
 
Wes
lol
 
and what's worse, it's not even Ice T, it's Ice Cube
 
Good morning
 
4:58 AM
mornin
 
Hey internal peeps... does calling reset on an array trigger copy on write semantics?
 
typed props RFC requires 2/3 I think?
 
Wes
i don't think so @Orangepill
though i'm not an internals peep
 
and lxr.php.net is still down..
 
just wondering if return reset($arr); would be more memory efficient then return array_shift($arr);
 
5:06 AM
not internal.. but I think reset($arr) would be more efficient, I think array_shift($arr) will make an excess copy/remove
 
Wes
@Orangepill yes, it's faster, because even if you aren't using integer keys array_shift will attempt to reindex them regardless
and so a copy of the array will be made if refcount > 1
 
y2013, but I think this will still be a good bench? blog.daviddemartini.com/archives/4875
 
Wes
array_slice($array, 0, 1)[0] will be faster than array_shift too
 
^ hurts readability
 
Wes
:P
 
5:11 AM
but I would have to test if there is a 0th element for that one.
 
Wes
just saying for the record. valid() + current() is better
 
hoi!
 
just go reset($arr) :)
Saitama hey
 
That's the way I was leaning. reset/end vs array_shift/array_pop
 
Wes
won't work if array contains booleans though, as reset() returns false if array is empty. in that case you need valid()
 
5:17 AM
good point.
 
Wes
morning joe
sorry joe :P
must be some recursion thing...
 
that's a common bug called Windows
 
lol
 
Wes
true
 
looks like valid isn't a function ... i know it's there for the Traversable Interface but valid($array); doesn't appear to be a thing
guess testing for an empty array would be just a good
 
Wes
5:25 AM
lol you are right :P yeah just do count($arr)
i thought valid existed. bah
 
1
Q: Short term effects of being able to find perfect soul mate

Pavel JanicekMy Artificial Intelligence became self aware and escaped from the box. It managed to install itself in every computer and every cellphone. Surprisingly, it does not want to kill us, but it seems it wants us to make happy. This AI installed an app to every phone: "Find your true love" app which w...

 
Wes
@Ocramius got a challenge for you. the simplest is_callable() you can think of that doesn't always return true if the object implements __call
 
o/
 
5:33 AM
This should work ... simple testing over 1000000 integers showed comparable memory usage but half the time for the reset/end approach
 
Hey my compiler is MSVC11 (Visual C++ 2012)
I am trying to install php_threads So i downloaded latest from http://windows.php.net/downloads/pecl/releases/pthreads/
BUt its not working i placed all 2 dll as asked but when i restarted xampp i got php7ts.dll is missing and unable to load dynamic library 'D:\xampp\php\ext\php_threads.dll' (My xampp is installed in `D:`) So how to resolve it...
 
:'D
I actually lol'd
 
@PraveenKumar you can't load pthreads in apache
 
> coz htm is basic for java
 
5:37 AM
@JoeWatkins So you are saying that i can not work on threads in apache ? Is there any other way to use threads with my installations ?
 
you can't use pthreads in apache, you can use it in CLI ...
 
threads can work only in cli...
 
Wes
@Saitama totally a troll
 
Any tutorial i can see or blog to follow :)
 
maybe...
 
5:38 AM
@Wes pfft CSS is a basic form of interior design
 
Wes
lol
joe, any idea how i could make an is_callable for objects methods that works exactly like php's is_callable but that doesn't always return true when __call is defined?
 
sure
> make an is_callable for objects methods that works exactly like php's is_callable but that doesn't always return true when __call is defined
 
Wes
the only implementation i can think of replicates the php semantics entirely and it's really massive
 
do that ...
 
Wes
boo joe
 
5:43 AM
show me code
 
Wes
i just tried doing that with is_callable. it works fine, unless __call is defined
 
hmm
I'm unsure, if you had a working version, then I would use that because
(string)@debug_backtrace(0, 2)[1]['class']
it can't be worse than that ...
 
@JoeWatkins Any tutorial or blog post for my problem ?? i have seen your github.com/krakjoe/pthreads
 
Wes
that gets the caller class context
it is bad because of @ ?
 
hi all who can help me with google analytics [nextlink] data stackoverflow.com/questions/37861734/…
 
5:50 AM
@Wes it's all bad
@PraveenKumar I'm not sure what you problem is ...
 
Wes
it's not that there are other ways to do that, joe :B
and since it's an hack, you got to be hacky...
 
yep
backtracing can be pretty expensive, depends what is further up the stack, args have to be addref'd at least, the limit helps ... it's just the nature of php, that to get that string, you created a bunch of hashtables and immediately destroyed them ...
not suggesting there's a better way ...
 
@JoeWatkins I just want to test threads on apache you said it can only work in CLI but i have no idea of where can i start So if you can give me a tutorial or blog post for it will be really good for me... :)
 
you have no idea where to start with the CLI ?
 
Wes
with $limit (the 2) debug_backtrace is fast, though
 
5:53 AM
fast != efficient ...
 
Wes
i've seen worse though. including other things i did :D
in that function the slowest part is "new ReflectionMethod" which i should cache, somehow
 
new in general is pretty expensive ...
 
Wes
i should probably improve the debug_backtrace part and use isset() instead of @
 
always ditch @
ever looked at how it works ?
 
Wes
ahaha no. but i can guess it :D
 
5:57 AM
it actually inserts additional instructions (2)
it's very stupid indeed ... never use it ... ever ...
 
Wes
it's like writing error_reporting = 0 manually?
 
no
krakjoe@fiji:/usr/src/php-src$ cat dbg.php
<?php
echo $hello;
?>
krakjoe@fiji:/usr/src/php-src$ phpdbg -n -p* dbg.php
function name: (null)
L1-2 {main}() /usr/src/php-src/dbg.php - 0x7fdcac85a300 + 2 ops
 L2    #0     ECHO                    $hello
 L2    #1     RETURN                  1
[Script ended normally]
krakjoe@fiji:/usr/src/php-src$ nano dbg.php
krakjoe@fiji:/usr/src/php-src$ cat dbg.php
<?php
echo @$hello;
?>
krakjoe@fiji:/usr/src/php-src$ phpdbg -n -p* dbg.php
function name: (null)
L1-2 {main}() /usr/src/php-src/dbg.php - 0x7f986a66a0c0 + 5 ops
it really fucks with code ... never ever use it ...
 
Wes
lol, ok
i sometimes use it, especially $valOrNull = @$array['possibly_undefined_key'];
 
Hey
this is index.php
`<?php

exec("d:/xampp/php/php.exe d:/xampp/htdocs/testphp/threads.php", $output);
print_r($output);?>`

And this is `testphp/threads.php` <?php
class Background extends Thread {

public function __construct(callable $call, array $args = []) {
$this->call = $call;
$this->args = $args;
}

public function run() {
call_user_func_array($this->call, $this->args);
}

protected $call;
protected $args;
}

$background = new Background(function($greeting){
printf("%s\n", $greeting);
 
Wes
but that was before php7's ??
 
6:03 AM
that's php7, I don't have php5 anymore ...
 
nin
 
'nin
@PraveenKumar pthreads isn't loaded in CLI ...
 
so Lorna is a Dev Advocate at IBM now? cool!
 
@JoeWatkins So how to load them ?
 
@PraveenKumar add extension=php_pthreads.dll to php-cli.ini in the same path as the currently loaded php.ini ...
@Gordon that is cool ...
@Wes I just understood that ...
 
6:07 AM
@JoeWatkins I dont have php-cli.ini i only have php.ini and in it i have already defined extension=php_pthreads.dll
 
yeah ?? is better ...
@PraveenKumar create php-cli.ini and remove extension line from php.ini
apache will not start with pthreads loaded, something is wrong with your configuration probably ...
(php-cli.ini should just be copy of php.ini with additional extension line(s))
 
@JoeWatkins created php-cli.ini with an extra line as you suggested but no effect still same...
Also restarted apache
I am on php 5
 
does the file exist ?
D:\xampp\php\ext\php_pthreads.dll
 
Yes it exists
 
you should just use CLI directly, while you are figuring out what is going on ...
what does php.exe -m say ?
 
6:12 AM
'nin o/
 
but i think the problem is with :- Compiler MSVC11 (Visual C++ 2012)
Architecture x86
But I have pthreadVC2.dll is that a problem
wait i am checking
 
Wes
@JoeWatkins the ['class'] key entry in the debug_backtrace output can either not exist or be a string, right? it's not that can also be null, or empty string?
 
I think so
 
Wes
i don't know why i added (string) :|
 
Happy Rebecca day
2
 
6:22 AM
!!rebecca \o/
 
hmm, I think I want an API for php.net/support and php.net/eol
 
omg. i forgot it @Gordon
 
@JoeWatkins php.exe -m giving same error
 
php --ini
 
6:26 AM
something like api.php.net/version/5.5.5?filter=eol which would then return {"version": "5.5.5", "eol":true}
does something like this exist yet?
 
@JoeWatkins got this
 
gom player.. i haven't seen it in a long time
i'm emotional right now
 
windows.. i haven't seen it in a long time
i'm emotional right now
 
hehe
 
6:32 AM
I am not a genius like you guys, i still work on windows shared server ... :D
 
really looks like it's not installed
 
@Gordon You don't have windows where you live? But won't it rain in then?
 
@PraveenKumar For simplicity and production replication I highly recommend using VirtualBox and Vagrant if you're on Windows.
 
@Gordon I think not ...
 
@Epodax no, I lead a happy life, so it's full of sunshine
 
Last night I dreamt I was a muffler I woke up exhausted
 
:X
 
But i have placed pthreadVC2.dll in D\xampp\php and php_pthreads.dll in D\xampp\php\ext and created php-cli.ini isn't all i had to do ??
 
@JoeWatkins do you think this would be useful to have?
 
@Gordon Ah, makes sense, you are ever so wise Gordon ;)
 
6:36 AM
I do
 
@Fabor i even don't know what these things are but i am quick learner so thank you so much for suggesting i will defiantly look into these... :)
 
I'm not sure who pays for bandwidth, and know none of our servers are that good ... what if something like composer decided to use it ... considerable traffic would result ...
 
I wouldnt mind putting it on my own server. not sure how much bandwidth I am allowed to waste though. will check.
 
@PraveenKumar yes ... and I would expect a different error if it were a build problem ...
 
also, can probably utilize lots of caching given that the data rarely changes
 
6:38 AM
you say it exists, php.exe says it doesn't ...
@Gordon still, you have to serve up the cache ...
 
morning
 
Morning
 
@JoeWatkins See it in screenshot
on the top
 
yeah, I dunno ...
did you build it yourself ?
 
NOpe just downloaded, unziped and placed there.. thats all i had done
 
6:41 AM
arch matches ?
 
@PraveenKumar I'd recommend it so much in fact, I would pause the issue with pthreads and do that first :P your choice though
 
@Naruto can you please have a look at stackoverflow.com/questions/37831131/…
 
@JoeWatkins what is arch matches ? :D
 
is architecture correct (x86/x64) ?
 
yes correct x86
@Fabor Man i will do that just after this issue... :) :)
 
6:45 AM
where is pthreadVC2.dll ?
 
Your issue might be void if you do it though.
 
@VikasSharma I've taken a look, but then I noticed magento, and I was out.. :)
 
Its in D:\xampp\php
 
@Naruto Oh ..No Problem.. Appreciate you for your message ....thank you..
 
you are using php 7, right ?
 
6:47 AM
@JoeWatkins Nope PHP 5.6.3.... Sorry but told you before
 
that doesn't support v3
 
Okk so i have to download V2 ?? than
 
yes
 
or upgrade?
 
it would be soooo much better to upgrade php ...
I don't really maintain v2 branch any more ...
also, php 5 sucks ...
 
6:49 AM
I think this is the issue i read it on your github but i completely forgot about it...
 
@JoeWatkins and @Fabor i work for a team of developers they give me projects of clients who have shared hostings and have PHP5 so i left with no choice but to work in these conditions... :)
 
They must not like security and speed very much
 
I wouldn't work on stuff that is on shared hosting ... you find people who are too cheap to buy proper hardware are too cheap to pay invoices too ...
2
 
@JoeWatkins Maintaining is not an issue i just want to learn and practice it so in future i can give interview in a really nice company and expand myself...
 
6:54 AM
afk, taxi
 
People in India don't willing to pay more so that leaves us no choice but to work on their conditions.. Suppose i am willing to do work for you guys how much you willing to pay me ?? :D
 
Hello guys
 

« first day (2071 days earlier)      last day (2893 days later) »