3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ListenerAggregate {} class EM { public function attach(callable $listener){ if($listener instanceof ListenerAggregate){ // this is indeed an aggregate! } } } class SomeAggregateListener implements ListenerAggregate { public function __invoke() { // look ma, I'm a callable! } } $em = new EM; $em->attach(function(){}); $aggregate = new SomeAggregateListener; $em->attach($aggregate);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.210.0130.04012.40
5.4.200.0080.04712.40
5.4.190.0140.04212.39
5.4.180.0120.04212.40
5.4.170.0120.04512.40
5.4.160.0160.04212.40
5.4.150.0100.05312.39
5.4.140.0120.04812.09
5.4.130.0120.04812.06
5.4.120.0150.04112.03
5.4.110.0120.04212.03
5.4.100.0120.04212.03
5.4.90.0130.04112.03
5.4.80.0130.04212.03
5.4.70.0100.04412.02
5.4.60.0140.04112.03
5.4.50.0110.04312.02
5.4.40.0130.04912.02
5.4.30.0100.04812.01
5.4.20.0200.05612.00
5.4.10.0170.06712.01
5.4.00.0070.05411.50
5.3.270.0150.05112.72
5.3.260.0110.05312.72
5.3.250.0140.05012.72
5.3.240.0120.05112.72
5.3.230.0100.04912.71
5.3.220.0140.04712.68
5.3.210.0120.04912.68
5.3.200.0130.04612.68
5.3.190.0130.04612.68
5.3.180.0190.07012.67
5.3.170.0100.05412.67
5.3.160.0130.04912.67
5.3.150.0140.04712.68
5.3.140.0160.04312.66
5.3.130.0140.04912.66
5.3.120.0120.04912.66
5.3.110.0170.06312.66
5.3.100.0120.05012.13
5.3.90.0120.05012.10
5.3.80.0110.04812.09
5.3.70.0130.04612.09
5.3.60.0100.04912.07
5.3.50.0130.04512.02
5.3.40.0150.04312.02
5.3.30.0120.04211.98
5.3.20.0160.05011.76
5.3.10.0120.04211.73
5.3.00.0110.04511.71

preferences:
140.34 ms | 1394 KiB | 7 Q