3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('1','2','23'); $b = (array) $a; /* function foo(&$b) { $b*=2; return $b; } $x = 3; $y = foo($x); $x = 5; echo $x . ' , ' . $y; //var_dump(false); /*preg_match('@^(?:http://)?([^/]+)@i','http://www.php.net/index.html',$matches); ${"a"} = $matches[1]; &$a = 12; echo &$a; var_export(${"a"});*/ /*echo ${"a"};*/ /*trait Foo { private $name = '123'; } class Bar { //use Foo; private static $name = '321'; public static function getName(){return static::$name;} } */ /*echo sprintf(' "%04d"', 1);*/ /* $num = array('11' , '12', '13'); foreach ($num as $val) { $val++; } print_r($num);*/ /* class Foo extends Bar{private static $name='123';} $bar = new Foo(); $bar::getName();*/ /*echo false; */ //class Faz {}// $i = new Faz(); echo $i->t;/* /* class Baz extends Faz {} interface Foo {public function du(Faz $param);} class A implements Foo { public function du(Baz $param){ echo false; } } $c = new A(); $c->du(new Baz());*/ /* $i = 5; echo $i++; echo $i;*/ /* namespace Bar; function strlen($string){return 5;} namespace Foo; use Bar; echo strlen('Baz');*/ //var_dump(array_values(ksort(array('re'=>'asd', '3'=>'asda')))); //echo true;

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.0120.00316.63
8.3.50.0120.00722.80
8.3.40.0110.00718.45
8.3.30.0040.01118.77
8.3.20.0000.00720.18
8.3.10.0040.00421.74
8.3.00.0050.00317.38
8.2.180.0120.00616.50
8.2.170.0100.00722.96
8.2.160.0110.00420.27
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00021.03
8.2.110.0040.00422.25
8.2.100.0080.00417.78
8.2.90.0040.00419.05
8.2.80.0030.00617.97
8.2.70.0000.00917.38
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0080.00018.22
8.2.30.0000.00817.86
8.2.20.0030.00517.70
8.2.10.0000.00817.92
8.2.00.0040.00417.66
8.1.280.0100.00325.92
8.1.270.0030.00623.96
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0080.00023.83
8.1.230.0070.00419.01
8.1.220.0000.00717.78
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0060.00317.10
8.1.180.0060.00318.96
8.1.170.0000.00918.41
8.1.160.0000.00721.98
8.1.150.0070.00018.77
8.1.140.0040.00417.25
8.1.130.0000.00719.65
8.1.120.0000.00717.27
8.1.110.0040.00417.41
8.1.100.0040.00317.36
8.1.90.0060.00317.29
8.1.80.0070.00017.27
8.1.70.0040.00417.32
8.1.60.0040.00417.55
8.1.50.0040.00417.50
8.1.40.0040.00417.41
8.1.30.0040.00417.63
8.1.20.0040.00417.62
8.1.10.0080.00017.45
8.1.00.0030.00617.23
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0000.00718.28
8.0.270.0000.00717.14
8.0.260.0060.00017.09
8.0.250.0030.00316.91
8.0.240.0070.00016.88
8.0.230.0040.00416.84
8.0.220.0000.00716.82
8.0.210.0040.00416.80
8.0.200.0060.00016.86
8.0.190.0030.00516.89
8.0.180.0040.00416.79
8.0.170.0000.00816.88
8.0.160.0040.00416.83
8.0.150.0000.00716.78
8.0.140.0000.01016.79
8.0.130.0030.00313.27
8.0.120.0040.00416.66
8.0.110.0040.00416.79
8.0.100.0080.00016.86
8.0.90.0040.00416.80
8.0.80.0060.00916.70
8.0.70.0000.00716.80
8.0.60.0030.00516.86
8.0.50.0000.00716.81
8.0.30.0200.00517.03
8.0.20.0090.01217.40
8.0.10.0000.00716.82
8.0.00.0130.00416.82
7.4.330.0020.00215.00
7.4.320.0030.00316.54
7.4.300.0030.00316.57
7.4.290.0060.00016.47
7.4.280.0040.00416.57
7.4.270.0000.00716.60
7.4.260.0040.00416.37
7.4.250.0020.00516.50
7.4.240.0040.00416.56
7.4.230.0000.00716.68
7.4.220.0030.01216.59
7.4.210.0070.00716.49
7.4.200.0070.00016.67
7.4.160.0130.01016.71
7.4.150.0120.00617.40
7.4.140.0070.01217.86
7.4.130.0120.01316.43
7.4.120.0100.00716.55
7.4.110.0030.01316.50
7.4.100.0090.01216.57
7.4.90.0120.00616.36
7.4.80.0070.01319.39
7.4.70.0070.00716.38
7.4.60.0030.01216.18
7.4.50.0060.00316.23
7.4.40.0030.01716.20
7.4.30.0120.00416.47
7.4.00.0090.00915.02
7.3.330.0000.00512.93
7.3.320.0020.00213.08
7.3.310.0070.00016.04
7.3.300.0060.00016.08
7.3.290.0030.01316.15
7.3.280.0070.01116.15
7.3.270.0070.01017.40
7.3.260.0070.01016.27
7.3.240.0040.01816.39
7.3.230.0030.01416.54
7.3.210.0070.01016.40
7.3.200.0150.00319.39
7.3.190.0080.00916.22
7.3.180.0170.00316.49
7.3.170.0100.00616.43
7.3.160.0060.01016.25
7.3.120.0100.00714.62
7.3.110.0120.00614.38
7.3.100.0050.00814.60
7.3.90.0080.00614.79
7.3.80.0040.00914.68
7.3.70.0030.00914.48
7.3.60.0060.00614.69
7.3.50.0080.00414.79
7.3.40.0050.00914.72
7.3.30.0090.00814.84
7.3.20.0020.01316.70
7.3.10.0050.00916.66
7.3.00.0050.01116.61
7.2.330.0040.01316.53
7.2.320.0120.00916.21
7.2.310.0100.00716.30
7.2.300.0100.00616.53
7.2.290.0060.00916.67
7.2.250.0070.01215.05
7.2.240.0020.01814.85
7.2.230.0110.00514.94
7.2.220.0030.01114.74
7.2.210.0050.00914.63
7.2.200.0050.00714.95
7.2.190.0050.01215.00
7.2.180.0000.01414.90
7.2.170.0020.01315.00
7.2.160.0030.01514.79
7.2.150.0070.01116.99
7.2.140.0040.01116.57
7.2.130.0090.00616.88
7.2.120.0030.01316.83
7.2.110.0060.00616.93
7.2.100.0040.01116.82
7.2.90.0110.00716.86
7.2.80.0040.01516.76
7.2.70.0040.01516.73
7.2.60.0060.01016.89
7.2.50.0070.01016.81
7.2.40.0040.01116.93
7.2.30.0090.00616.81
7.2.20.0090.00616.84
7.2.10.0000.01416.97
7.2.00.0080.00416.88
7.1.330.0030.01015.51
7.1.320.0070.00315.54
7.1.310.0080.00515.72
7.1.300.0040.00915.52
7.1.290.0040.00915.54
7.1.280.0090.00815.59
7.1.270.0070.00515.55
7.1.260.0030.00715.53
7.1.250.0040.01115.74
7.1.70.0100.00616.92
7.1.60.0140.01019.40
7.1.50.0180.00716.58
7.1.00.0070.07322.52
7.0.200.0040.00416.75
7.0.140.0030.07321.97
7.0.60.0030.05319.99
7.0.50.0100.03717.87
7.0.40.0100.06020.07
7.0.30.0370.06720.34
7.0.20.0370.07720.03
7.0.10.0030.07320.09
7.0.00.0200.06720.01
5.6.280.0100.06720.85
5.6.210.0100.07720.71
5.6.200.0070.08018.15
5.6.190.0000.08720.32
5.6.180.0230.05320.39
5.6.170.0170.08720.46
5.6.160.0100.06720.49
5.6.150.0130.08018.09
5.6.140.0000.05018.14
5.6.130.0030.08318.05
5.6.120.0200.07020.98
5.6.110.0070.09020.95
5.6.100.0130.07720.98
5.6.90.0130.05021.11
5.6.80.0130.07720.39
5.5.350.4330.03720.43
5.5.340.0130.07318.07
5.5.330.0100.06720.47
5.5.320.0200.08320.41
5.5.310.0270.06320.30
5.5.300.0070.08317.89
5.5.290.0030.07017.88
5.5.280.0100.05020.75
5.5.270.0070.04720.87
5.5.260.0070.07720.71
5.5.250.0030.08320.65
5.5.240.0070.07720.28
5.4.450.0770.06019.55
5.4.440.0070.06019.25
5.4.430.0230.05019.16
5.4.420.0730.06019.21
5.4.410.0930.05719.20
5.4.400.0670.05319.16
5.4.390.0370.05019.32
5.4.380.0230.05018.56
5.4.370.0130.03718.62
5.4.360.0100.03718.64
5.4.350.0070.04911.97
5.4.340.0080.05411.96
5.4.320.0060.05112.45
5.4.310.0040.04212.45
5.4.300.0070.03512.45
5.4.290.0070.03712.45
5.4.280.0090.03612.35
5.4.270.0090.04112.35
5.4.260.0030.04212.34
5.4.250.0040.04012.34
5.4.240.0070.03512.35
5.4.230.0070.03912.34
5.4.220.0060.03712.34
5.4.210.0070.03612.34
5.4.200.0060.03912.34
5.4.190.0050.03812.34
5.4.180.0070.03412.34
5.4.170.0100.03212.34
5.4.160.0110.03012.34
5.4.150.0070.03512.34
5.4.140.0060.04212.02
5.4.130.0050.03712.01
5.4.120.0110.03411.97
5.4.110.0070.03511.96
5.4.100.0050.03611.96
5.4.90.0060.03711.96
5.4.80.0030.03911.96
5.4.70.0090.03111.96
5.4.60.0080.03211.96
5.4.50.0050.03611.96
5.4.40.0060.03811.95
5.4.30.0040.03711.95
5.4.20.0050.03511.95
5.4.10.0050.03911.94
5.4.00.0070.03911.44
5.3.290.0070.04712.80
5.3.280.0040.04012.71
5.3.270.0050.04612.72
5.3.260.0060.03812.72
5.3.250.0030.03912.72
5.3.240.0090.04112.72
5.3.230.0050.03712.71
5.3.220.0090.03412.68
5.3.210.0070.03712.68
5.3.200.0110.04012.68
5.3.190.0050.03812.68
5.3.180.0030.03912.68
5.3.170.0090.03412.67
5.3.160.0050.03612.68
5.3.150.0060.03612.67
5.3.140.0080.03712.66
5.3.130.0090.04012.66
5.3.120.0080.03712.66
5.3.110.0060.03812.66
5.3.100.0070.03612.12
5.3.90.0060.03812.09
5.3.80.0070.03612.07
5.3.70.0050.03712.07
5.3.60.0080.03412.06
5.3.50.0070.03612.00
5.3.40.0060.03612.00
5.3.30.0070.03411.94
5.3.20.0070.03311.72
5.3.10.0060.03711.69
5.3.00.0020.04011.68
5.2.170.0060.0309.18
5.2.160.0070.0329.18
5.2.150.0060.0349.18
5.2.140.0050.0309.18
5.2.130.0030.0349.13
5.2.120.0050.0309.14
5.2.110.0040.0299.14
5.2.100.0070.0289.14
5.2.90.0040.0299.14
5.2.80.0050.0309.13
5.2.70.0050.0299.13
5.2.60.0060.0309.09
5.2.50.0050.0339.05
5.2.40.0060.0329.04
5.2.30.0060.0319.01
5.2.20.0050.0349.00
5.2.10.0030.0328.91
5.2.00.0050.0298.78
5.1.60.0070.0228.06
5.1.50.0080.0268.06
5.1.40.0060.0238.04
5.1.30.0010.0298.39
5.1.20.0040.0278.41
5.1.10.0050.0258.14
5.1.00.0070.0228.14
5.0.50.0030.0296.61
5.0.40.0040.0186.47
5.0.30.0020.0326.29
5.0.20.0040.0186.26
5.0.10.0030.0196.23
5.0.00.0040.0306.23
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0040.0154.76
4.4.60.0020.0204.75
4.4.50.0050.0134.77
4.4.40.0020.0264.71
4.4.30.0020.0164.75
4.4.20.0040.0144.85
4.4.10.0030.0174.85
4.4.00.0020.0254.76
4.3.110.0020.0194.67
4.3.100.0030.0214.66
4.3.90.0040.0194.63
4.3.80.0040.0244.59
4.3.70.0040.0134.63
4.3.60.0030.0184.63
4.3.50.0030.0194.63
4.3.40.0040.0254.54
4.3.30.0020.0183.28
4.3.20.0020.0203.26
4.3.10.0040.0133.21
4.3.00.0130.0278.45

preferences:
69.6 ms | 401 KiB | 5 Q