logs archiveIRC Archive / Freenode / #php / 2015 / August / 8 / 1
__adrian
or rather, "Reference to value of $foo_1"
runinsquares http://viper-7.com/TiA5VC
cofo
Is there major difference between php api (20031224) and now 20121113 ?
the older is book
im smile the book got good review
runinsquares
__adrian, yeah i missed that but couldnt be bothered to re-edit
__adrian
sure
sorry i had to run
runinsquares
lol me too i've been to two supermarkets in the last two hrs
cofo
i installed linux
:)
setup my machine
thebuccaneersden
awesome
__adrian
sweet
cofo
thx ^_^
         

runinsquares
Happy_the_Exceed, i understand why companies do it but it's annoying as hell to have to verify some PIN or something via email when you login (steam for example)
cofo
I know what is ".=" but i want to find definition in google. How is it called in english?
Operators in string
runinsquares
concatenation
__adrian
concatenating assignment operator
laszlof
string concatenating assignment operator
time to go get my car painted
__adrian
actually... ok, "string combined assignment operator"
whatever
laszlof, paint it orange!!
caffinated
we can just call it a thingy and be done with it
cofo
__adrian
lol, i was right the first time
Kirito
Accidentally typing a period instead of a comma when supplying function arguments leads to a fun debugging experience
monodesigns
All typos make for a fun debugging experience.
Kirito
This one especially so, since it's very hard to distinguish "." from ",". Not to mention when you have a function that takes multiple integers as arguments, figuring out why 1 turns into 13 in foo(1, 3) is annoying :D
foo(1. 3) that is
monodesigns
Ouch.
alexi5
Hello
zro
is there any reason i should not call a static method via $this ? doesnt seem to raise an error.
i guess maybe its less clear that its actual static when readin it
DissidentRage
zro: because $this refers to an instance
Sansay_
hey guys how do i merge the arrays in the example, while retaining all headers even if the array element doesnt have the header in array1 or viceversa: http://pastebin.com/nYZdsGgm
zro
right, and if i have an instance of a class which happens to have a static method ....
Sansay_
you can still use $this
DissidentRage
then use static:: instead of $this->
         

zro
just because it's more clear? like I said, doesnt seem to raise an error
DissidentRage
no because it's correct
__adrian
zro, static:: is clearer.
or self::
or whatever
DissidentRage
Kirito
$this::static() :D
__adrian
:/
Kirito
be a rebel, follow no standards
DissidentRage
I wish PHP would fail
__adrian
static methods belong to the class, not to any specific object instance. use the scope resolution keyword you actually want.
Kirito
Actually I have more or less done that before
There is one case in which it actually kind of makes sense
DissidentRage
[skepticism intensifies]
zro
ya, i figure, i was surprised it didnt fail.
Kirito
Integrating closure $this support for PHP 5.3 compatible applications, if that counts
Where you do $self = $this; then use that in the closure function.
__adrian
5.3 doesn't count.
Kirito
meep
caffinated
Kirito: it's better to just use use()
__adrian
if you run a supported version of php... :)
Kirito
(That's what I mean), $self = $this; something( function() use( $self ) );
caffinated
no
Kirito
except with correct syntax
caffinated
use(&$this)
Kirito
Oh, huh, good point, I'll update that
__adrian
$this is already available in your closure. you can even change which object/class it refers to. you don't need to use use()
Kirito
It's for applications / plugins to commercial software, so PHP 5.3 compatibility isn't optional
Since 5.3 still has a 30% or so market share
coreyw
Question regarding DDD, and using repositories that return entities.. I'm trying to convert an array result from the database into an object (entity), but some of these entities rely on other repositories for their relationships.. A post has categories and an author, so when I transform the 'author_id' into an author entity, I need the author repository to grab it. How should I best...
...implement this?
Kirito
With OSS you can say sod people who use unsupported versions, but yeah.
caffinated
__adrian: huh, so it is. I always thought it was out of scope.
Kirito
It is since 5.4
__adrian
Kirito, i disagree. 5.3 compatibility is NOT optional, it is completely the wrong idea.
alexi5
I was wondering what type of applications are document databases more suited for than rdbms? And also are document databases best used when run on more than one node ?
__adrian
caffinated it's a lot of fun. unless you define the closure inside a static class method.
then it's all screwy
Kirito
__adrian, you're free to make your case to the development team :D
I don't support unsupported versions of PHP in anything I personally write though
__adrian
http://viper-7.com/KJICVw
Kirito it's not my dev team
my dev team is on 5.6.11
seriously, here's your case, though: 5.3 has some critical security flaws. no one will EVER fix them.
better to maintain your own branch? or upgrade?
runinsquares
bcrypt was fixed with 5.4 wasn't it?
Kirito
Yeah, I know, I understand and I agree. But 30% of the market doesn't really care about that, and commercial software generally tends to work around peoples stupidity
__adrian
(Action) shrugs
i'd find a differently-minded complny
*company
runinsquares
programmers move forward, businesses for the most part like to keep what they have
Kirito
Yeah
To a frightening degree in many cases :/
__adrian
so, it all comes down to what you're willing to do about it :)
anyway. yes, look at Closure::bind() / bindTo()
they are fun
and php7 has Closure::call()
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 next »