3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 'ahoj'; public function fet(&$a) { } public function __invoke(&$a) { echo $this->a; } } $a = new A; /*$a('ahoj'); $ref = new \ReflectionMethod($a, '__invoke'); $ref->setAccessible(true); $ref->invoke($a, 'ahoj');*/ function f_a($b, &$a) { } f_a(3, 'ss'); //$ar = array($a, 'fet'); //$a->fet(new DateTime);

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)
8.3.60.0140.00718.43
8.3.50.0100.01121.14
8.3.40.0100.01018.84
8.3.30.0100.00320.18
8.3.20.0070.00020.16
8.3.10.0000.00821.88
8.3.00.0040.00422.50
8.2.180.0120.00916.88
8.2.170.0110.00422.96
8.2.160.0040.01122.30
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0080.00020.73
8.2.110.0060.00322.13
8.2.100.0070.00318.56
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0090.00018.39
8.1.230.0030.00618.49
5.4.240.0100.04512.39
5.4.230.0080.04712.38
5.4.220.0090.04512.39
5.4.210.0060.04612.39
5.4.200.0090.04412.38
5.4.190.0080.04712.38
5.4.180.0090.04612.38
5.4.170.0060.05312.39
5.4.160.0190.07312.39
5.4.150.0090.05512.38
5.4.140.0060.04712.07
5.4.130.0060.04612.06
5.4.120.0090.05212.01
5.4.110.0190.06912.01
5.4.100.0080.04712.01
5.4.90.0090.05312.01
5.4.80.0070.04912.01
5.4.70.0050.04712.01
5.4.60.0070.04712.00
5.4.50.0100.04512.00
5.4.40.0090.04511.99
5.4.30.0090.05011.99
5.4.20.0080.04911.99
5.4.10.0080.04411.99
5.4.00.0060.04711.48
5.3.280.0070.05212.71
5.3.270.0090.05612.73
5.3.260.0090.05312.72
5.3.250.0100.04612.72
5.3.240.0090.04212.72
5.3.230.0090.04712.71
5.3.220.0100.04512.68
5.3.210.0090.04712.68
5.3.200.0100.04812.68
5.3.190.0090.04612.68
5.3.180.0090.04512.67
5.3.170.0100.05612.67
5.3.160.0090.04912.67
5.3.150.0070.04912.67
5.3.140.0090.05312.66
5.3.130.0100.05712.66
5.3.120.0100.04812.66
5.3.110.0120.04512.66
5.3.100.0090.04712.12
5.3.90.0070.04912.10
5.3.80.0080.04312.08
5.3.70.0090.04012.09
5.3.60.0080.04112.07
5.3.50.0100.04412.02
5.3.40.0100.04512.01
5.3.30.0090.04611.97
5.3.20.0100.04711.75
5.3.10.0080.04911.72
5.3.00.0040.05411.70

preferences:
33.65 ms | 401 KiB | 5 Q