3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*trait Foo { private $name = '123'; } class Bar { use Foo; private $name = '321'; public function getName(){echo $this->name;} } $bar = new Bar(); $bar->getName();*/ /*echo false; class Faz {} class Baz extends Faz {} interface Foo {public function du(Faz $param);} class A implements Foo { public function du(Baz $param){ echo false; } }*//* $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'))));

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.70.0070.01416.63
8.3.60.0070.01016.88
8.3.50.0120.01022.87
8.3.40.0070.00718.97
8.3.30.0100.00319.09
8.3.20.0040.00420.39
8.3.10.0080.00021.69
8.3.00.0080.00017.47
8.2.180.0040.01118.29
8.2.170.0140.00022.96
8.2.160.0060.00919.51
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0110.00826.16
8.2.120.0080.00021.03
8.2.110.0070.00321.12
8.2.100.0090.00317.97
8.2.90.0000.00819.05
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00818.07
8.2.30.0030.00618.12
8.2.20.0000.00817.75
8.2.10.0020.00518.02
8.2.00.0060.00317.55
8.1.280.0060.01225.92
8.1.270.0080.00023.66
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0000.00922.81
8.1.230.0080.00317.70
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.10
8.1.180.0090.00018.10
8.1.170.0030.00618.65
8.1.160.0000.00718.72
8.1.150.0040.00418.65
8.1.140.0070.00017.20
8.1.130.0030.00317.75
8.1.120.0000.00717.27
8.1.110.0000.00817.38
8.1.100.0000.00717.37
8.1.90.0040.00417.31
8.1.80.0000.00717.38
8.1.70.0000.00717.30
8.1.60.0080.00017.34
8.1.50.0000.00817.39
8.1.40.0030.00517.43
8.1.30.0030.00617.53
8.1.20.0030.00617.59
8.1.10.0000.00717.48
8.1.00.0030.00617.44
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0030.00318.45
8.0.270.0100.00017.25
8.0.260.0000.00617.16
8.0.250.0040.00417.04
8.0.240.0070.00017.01
8.0.230.0000.00716.93
8.0.220.0030.00316.79
8.0.210.0040.00416.89
8.0.200.0080.00016.96
8.0.190.0060.00316.91
8.0.180.0000.00717.00
8.0.170.0020.00516.93
8.0.160.0000.00716.87
8.0.150.0030.00316.75
8.0.140.0090.00016.86
8.0.130.0000.00613.33
8.0.120.0000.00816.89
8.0.110.0070.00016.78
8.0.100.0070.00016.95
8.0.90.0030.00316.96
8.0.80.0100.00716.95
8.0.70.0050.00216.91
8.0.60.0000.00716.86
8.0.50.0000.00816.93
8.0.30.0120.00717.16
8.0.20.0150.00817.40
8.0.10.0040.00416.91
8.0.00.0120.00516.80
7.4.330.0050.00015.02
7.4.320.0030.00316.41
7.4.300.0030.00316.36
7.4.290.0000.00716.57
7.4.280.0050.00316.53
7.4.270.0030.00316.46
7.4.260.0030.00316.32
7.4.250.0000.00716.54
7.4.240.0060.00116.54
7.4.230.0000.00716.56
7.4.220.0150.00616.36
7.4.210.0040.01216.54
7.4.200.0070.00016.44
7.4.160.0070.01016.42
7.4.150.0090.00917.40
7.4.140.0140.00717.86
7.4.130.0080.00916.47
7.4.120.0100.00716.51
7.4.110.0100.00716.44
7.4.100.0150.00916.48
7.4.90.0120.00416.65
7.4.80.0120.00619.39
7.4.70.0090.00616.64
7.4.60.0130.00716.70
7.4.50.0000.00916.58
7.4.40.0120.00616.54
7.4.30.0030.01316.46
7.4.00.0070.00714.95
7.3.330.0030.00313.14
7.3.320.0020.00213.30
7.3.310.0030.00316.36
7.3.300.0000.00716.30
7.3.290.0080.00516.32
7.3.280.0090.00716.32
7.3.270.0030.01417.40
7.3.260.0130.00416.49
7.3.250.0140.00716.38
7.3.240.0110.00516.24
7.3.230.0080.00816.39
7.3.210.0060.01116.34
7.3.200.0070.01019.39
7.3.190.0120.00916.45
7.3.180.0030.01316.45
7.3.170.0120.00316.37
7.3.160.0080.00816.39
7.2.330.0090.01316.58
7.2.320.0090.00616.62
7.2.310.0100.00716.67
7.2.300.0290.02416.38
7.2.290.0170.00716.50
7.2.60.0210.00316.73
7.2.50.0120.00416.68
7.2.00.0030.01019.23
7.1.200.0040.00815.70
7.1.70.0150.00417.15
7.1.60.0070.01319.40
7.1.50.0110.00716.93
7.1.00.0100.06722.41
7.0.200.0000.00816.66
7.0.140.0030.07322.09
7.0.60.0100.06020.00
7.0.50.0030.06317.80
7.0.40.0000.04720.18
7.0.30.0200.04020.21
7.0.20.0330.05720.20
7.0.10.0030.04320.15
7.0.00.0100.06720.11
5.6.280.0000.07321.07
5.6.210.0070.03720.70
5.6.200.0100.08318.12
5.6.190.0030.04720.52
5.6.180.0300.05020.33
5.6.170.0330.04020.57
5.6.160.0070.07320.46
5.6.150.0100.03318.18
5.6.140.0000.07718.16
5.6.130.0070.08018.17
5.6.120.0200.07321.02
5.6.110.0100.08321.13
5.6.100.0030.04321.10
5.6.90.0030.04320.88
5.6.80.0070.07720.44
5.5.350.4130.03320.30
5.5.340.0030.05318.01
5.5.330.0130.07720.40
5.5.320.0230.06320.27
5.5.310.0230.07720.51
5.5.300.0100.07718.07
5.5.290.0170.06318.10
5.5.280.0070.09020.88
5.5.270.0030.06020.88
5.5.260.0030.06020.77
5.5.250.0030.05020.78
5.5.240.0000.08020.24
5.4.450.0230.04719.48
5.4.440.0500.04719.54
5.4.430.0330.05019.19
5.4.420.0730.04719.20
5.4.410.0330.04019.06
5.4.400.0500.05719.23
5.4.390.0430.04319.05
5.4.380.0770.06318.59
5.4.370.0500.05018.53
5.4.360.1000.05018.51
5.4.350.0800.06018.74
5.4.340.0800.05018.72
5.4.320.0060.03412.50
5.4.310.0040.05212.50
5.4.300.0100.03312.50
5.4.290.0090.03612.50
5.4.280.0070.03612.39
5.4.270.0040.03712.39
5.4.260.0060.03712.39
5.4.250.0090.04212.39
5.4.240.0050.03612.39
5.4.230.0050.03812.39
5.4.220.0080.04012.38
5.4.210.0060.03512.39
5.4.200.0050.03812.39
5.4.190.0050.03712.39
5.4.180.0100.03912.38
5.4.170.0100.03912.39
5.4.160.0100.03212.39
5.4.150.0050.03712.38
5.4.140.0050.03812.06
5.4.130.0050.03712.06
5.4.120.0070.03512.01
5.4.110.0090.03312.01
5.4.100.0070.03712.01
5.4.90.0090.04012.00
5.4.80.0080.03412.01
5.4.70.0040.03912.00
5.4.60.0080.03812.00
5.4.50.0070.03812.00
5.4.40.0060.03512.00
5.4.30.0100.04411.99
5.4.20.0070.04111.99
5.4.10.0060.03511.99
5.4.00.0060.03711.48
5.3.290.0080.03712.80
5.3.280.0090.03612.71
5.3.270.0050.04312.73
5.3.260.0090.04012.72
5.3.250.0090.03412.72
5.3.240.0050.04212.72
5.3.230.0070.03812.70
5.3.220.0060.03612.68
5.3.210.0060.04512.68
5.3.200.0030.04512.68
5.3.190.0070.04212.68
5.3.180.0070.04812.67
5.3.170.0080.04112.67
5.3.160.0100.04312.68
5.3.150.0070.03612.67
5.3.140.0060.03712.66
5.3.130.0060.04012.66
5.3.120.0070.04312.66
5.3.110.0050.03912.66
5.3.100.0060.04312.12
5.3.90.0050.04712.10
5.3.80.0050.04312.09
5.3.70.0090.03212.09
5.3.60.0060.04212.08
5.3.50.0060.03512.02
5.3.40.0110.03812.02
5.3.30.0080.03711.98
5.3.20.0040.04711.77
5.3.10.0070.04511.73
5.3.00.0090.04011.71
5.2.170.0100.0349.18
5.2.160.0020.0319.18
5.2.150.0080.0349.18
5.2.140.0050.0339.18
5.2.130.0050.0289.14
5.2.120.0040.0309.13
5.2.110.0020.0319.15
5.2.100.0040.0299.14
5.2.90.0020.0339.14
5.2.80.0050.0299.13
5.2.70.0060.0319.14
5.2.60.0040.0309.09
5.2.50.0050.0379.06
5.2.40.0060.0449.04
5.2.30.0050.0299.01
5.2.20.0070.0259.00
5.2.10.0080.0328.92
5.2.00.0080.0368.79
5.1.60.0050.0278.07
5.1.50.0050.0288.06
5.1.40.0050.0358.04
5.1.30.0030.0348.40
5.1.20.0060.0298.42
5.1.10.0080.0338.14
5.1.00.0050.0248.14
5.0.50.0060.0266.62
5.0.40.0040.0276.48
5.0.30.0040.0466.29
5.0.20.0030.0256.27
5.0.10.0050.0196.24
5.0.00.0050.0366.23
4.4.90.0050.0234.78
4.4.80.0050.0214.75
4.4.70.0060.0224.75
4.4.60.0010.0174.75
4.4.50.0020.0244.77
4.4.40.0040.0234.71
4.4.30.0030.0244.76
4.4.20.0020.0164.84
4.4.10.0030.0144.85
4.4.00.0050.0224.76
4.3.110.0030.0164.67
4.3.100.0040.0134.66
4.3.90.0020.0154.64
4.3.80.0020.0304.58
4.3.70.0030.0144.63
4.3.60.0040.0294.63
4.3.50.0020.0164.62
4.3.40.0020.0264.54
4.3.30.0020.0153.28
4.3.20.0020.0283.25
4.3.10.0010.0163.21
4.3.00.0070.01715.89

preferences:
40.44 ms | 401 KiB | 5 Q