« first day (1803 days earlier)      last day (3373 days later) » 

21:02
@Fabor There's a new amphp/dns update, that should fix your issue.
both of these give the biggest id in the table. which one is faster?
SELECT row from table ORDER BY id DESC LIMIT 1
SELECT max(id) FROM table
Anonymous
Wow, there is a real battle going on for the short closures vote. 19/17 in favor of the closures.
@samayo It needs two thirds to pass.
All the conservative people voted no…
@Sajad Easy enough for you to find out yourself...
    $start = microtime( true );

    for ($i = 0; $i < 10000; ++$i) {
        // put your test case A here.
    }

    $total_time = microtime( true ) - $start;
    echo "Total time: ", number_format($total_time, 6), PHP_EOL;

    $start = microtime( true );

    for ($i = 0; $i < 10000; ++$i) {
        // put your test case B here.
    }

    $total_time = microtime( true ) - $start;
    echo "Total time: ", number_format($total_time, 6), PHP_EOL;
Anonymous
21:13
At least two regulars in this room have voted no salathe, and andrea. @bwoebi
@samayo Still no idea why Andrea voted no…
Anonymous
Is there a discussion page/thread on each RFCs in the site? I like to know why some people voted no.
@Ghedipunk thanks pal.
Sep 7 at 0:39, by Andrea
@bwoebi this is ultimately nitpicking anyway. Multiple people have told you that -> and ~> are easily confused. Don't ignore their experiences. You can present all the proof you like, but it doesn't change anything.
A complete mystery.
@Danack Woops
I meant Peter
Anonymous
21:23
Nah, it does not seem that much confusing, specially when you paste the code in a real IDE, which I just did.
not Andrea ^^
personally, I think ==> would be the best option, and fn as suggested
Anonymous
@iroegbu That would be excellent choice.
fn() is probably the best choice as it allows types and all.
can I put some code between try{}-catch{}?
try{}
... somecode
cache{}
Anonymous
21:34
try{
  .. somecode
}catch(\Exception $e){
  echo 'error is :'. $e->getMessage();
}
@samayo I know its syntax, but my question is, If I put some code between two block, they will be run (compile)?
Anonymous
Yes.
ok tnx
@samayo wat? no… it won't.
@Sajad you'll be better served if you read manual then ask question based on what you don't understand
Anonymous
21:36
@bwoebi Yeah. It will run
Anonymous
oO
catch-block won't execute if \Exception isn't thrown in try-block
@samayo he's talking about try { /* code */ } some_code(); catch { /* catch block */ }
@iroegbu ok
Anonymous
@bwoebi lol no. He is mistaken.
Anonymous
21:38
You can see he typed cache() also
@bwoebi yes
@samayo typo, sorry
Anonymous
try{
}
# WHY would you put your code here?
catch(\Exception $e){
  echo 'error is :'. $e->getMessage();
}
Anonymous
@Sajad answer that question please
@samayo I have a redirect code after try{}, I insert some data in the try{} block, I want it data inserted, then before run catch{}, page get redirect
@bwoebi tnx
Anonymous
21:42
@Sajad Just post your code relating to the try/catch part.
ThW
ThW
what?
@samayo yes, I got it what should I do. tnx
and the ...somecode part
Anonymous
You have to remember that try/catch is nothing but mysql_query() or die() on steroids. It's all about cause and effect. If the logic in your try{} block fails, then throw an exception. @Sajad
ThW
ThW
urgs no
21:45
@samayo yeah I understand it now, it is something like if-else
ThW
ThW
not really, you can check the result of a method/function and call some logic depending on that - but it is specific. You know exactly what causes the failure. Exception handling is more flexible, the exceptions go up the call stack until you catch them, so you only need to know about exception and not the cause or the how it happens - only that it happens.
that allows for a better separation
@ThW good explanation, tnx
22:02
looks like the PHP History page might need an update for PHP 6 and PHP 7
ThW
ThW
@Andrea Can't we just forget about PHP 6?
Abe
Abe
i want to buy a php6 book just for the lulz #stillhaventlearnedthevalueofmoney
@Trowski Looks correct but honestly I didn't completely understand what you were saying.
@samayo BULLSHIT
what you wrote, @samayo, is basically like saying that "objects are just arrays on steroids"
it demonstrates significant lack of understanding
22:26
@ThW can't we just after PHP 7.0 RC 6 tag the PHP 6.0?
@LeviMorrison Just trying to think of a real-world example where intersection types would help avoid the need to declare empty interfaces that only serve to combine other interfaces.
@Trowski my understanding is the problem is that you aren't always able to combine the interfaces that a class implements e.g. the code belongs to another team, and they don't want to change their stuff for you. Or more simply, when you make a class, you can know what interfaces it implements, but you can't know what how that class will be used - as in what subset of interfaces on it will be needed by particular functions.
Also, combining interfaces has a high wtf level to me:
class Foo implements I1, I2, I3 { }
function bar(I1 & I2 $bar) {}
function zot(I2 & I3 $zot) {}
vs
interface I1and2 extends I1, I2 {}
interface I2and3 extends I2, I3 {}
class Foo implements I1and2, I2and3 {}

function bar(I1and2 $bar) {}
function zot(I2and3 $zot) {}
22:42
why can't we just let it leak github.com/php/php-src/commit/… j/k
In general I would agree that combining interfaces is a code smell. There certainly are valid use-cases though, and I much prefer the former to the latter.
Yeah...I was making the argument for it. Not sure if I believe it.
The union stuff would be useful, if nothing else other than 'things that are foreachable' in PHP.
can I use CCv3.0 assets in BSD/MIT software?
@tereško Well, the code is MIT and the assets are CC then, you have to state that somewhere.
@tereško what is the actual license? CCv3.0 is the version of the framework not a particular one I think. e.g. "CC BY" is an actual license.
Then yes, though you ought to indicate that multiple licenses apply to the product at the top level of the source.
aka in the license file.
@Danack or they could make an a make an array match the builtin array like interfaces
$obj = new StdClass;
$obj->foo = "bar";
foreach ($obj as $omg) {
echo $omg;
}
I see what you are saying..
took me a bit but I can see the problem now.
there's other stuff as well....for example count() which is not always an interface, but a magic.gif thing.
Anonymous
23:36
@tereško I was just trying to make him easily understand, because he had no idea of what exceptions were.
@3.14159265358... Yeah it's pretty neat.
@samayo while I appreciate the effort, what you were doing was, when 8 year old asks "what is light", you take to rocks and start banging them together "light is like this"
you were using wrong metaphor .. which, if accepted as absolute truth, would be really really harmful
didn't you see what happened when someone linked him to "anti-if" page?
Anonymous
Well, it is based on a personal experience. None of the explanations I was given here, while I was struggling to understand about OOP were any helpful to me. Simple and silly metaphors are the way to go sometimes.
Anonymous
But, I understand your point.
Anonymous
2 hours ago, by Sajad
@ThW good explanation, tnx
Anonymous
23:44
I'm probably sure he wasn't telling the truth here.
Anonymous
He just felt guilt and opted out. I have done this several time.
probably
Anonymous
Only a better noob can tech another noob imho
fuck, I feel out of my depth again: tympanus.net/codrops/2015/09/23/elastic-progress
9
Anonymous
I love the tympanus devs. so talented.
23:57
apress.com/9781590598191 : did you prefer this book for reading
teresko
@AnmolRaghuvanshi no
I haven't looked at what it contains
ahh ok just give you hint
View: The view layer is typically what would be considered web design, or templating. in MVC

« first day (1803 days earlier)      last day (3373 days later) »