3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rose = "black"; ${"rose"} = "white"; $rose = "red"; print_r(${"rose"}); echo "\n\n"; ${" "} = "white"; print_r(${" "}); echo "\n\n"; $arr{" "} = 99; var_dump($arr); $o = (object) $arr; var_dump($o); echo $o->{" "},"\n\n"; class x extends stdClass { public $val; function Show($n){ $this->val = $n; return $this->val; } } $s = new x(); echo $s->Show(100),"\n"; var_dump($s);

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.0090.00618.09
8.3.60.0170.00018.55
8.3.50.0110.00821.99
8.3.40.0130.00718.85
8.3.30.0100.00318.90
8.3.20.0040.00420.12
8.3.10.0040.00423.61
8.3.00.0050.00319.25
8.2.180.0170.00716.63
8.2.170.0130.00322.96
8.2.160.0000.01320.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00726.16
8.2.120.0080.00022.25
8.2.110.0030.00622.38
8.2.100.0090.00317.72
8.2.90.0030.00618.92
8.2.80.0000.00817.97
8.2.70.0050.00317.25
8.2.60.0030.00517.68
8.2.50.0000.00818.07
8.2.40.0030.00619.88
8.2.30.0030.00617.86
8.2.20.0040.00417.61
8.2.10.0050.00317.93
8.2.00.0020.00517.66
8.1.280.0070.00725.92
8.1.270.0060.00321.96
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0080.00023.92
8.1.230.0070.00319.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0090.00016.88
8.1.190.0030.00517.10
8.1.180.0080.00018.10
8.1.170.0060.00318.58
8.1.160.0050.00321.98
8.1.150.0000.00718.75
8.1.140.0040.00417.25
8.1.130.0070.00017.71
8.1.120.0050.00217.22
8.1.110.0030.00617.35
8.1.100.0040.00417.22
8.1.90.0030.00417.34
8.1.80.0000.00717.38
8.1.70.0000.00717.16
8.1.60.0040.00417.38
8.1.50.0000.00817.28
8.1.40.0080.00017.28
8.1.30.0090.00017.53
8.1.20.0070.00017.42
8.1.10.0050.00217.38
8.1.00.0000.00817.28
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.31
8.0.270.0000.00717.09
8.0.260.0080.00017.13
8.0.250.0000.00616.90
8.0.240.0000.00816.90
8.0.230.0000.00716.74
8.0.220.0030.00516.82
8.0.210.0040.00416.73
8.0.200.0000.00716.88
8.0.190.0000.00816.92
8.0.180.0070.00016.84
8.0.170.0050.00316.87
8.0.160.0040.00416.82
8.0.150.0040.00416.83
8.0.140.0000.00816.70
8.0.130.0060.00013.21
8.0.120.0030.00516.78
8.0.110.0040.00416.82
8.0.100.0000.00816.73
8.0.90.0000.00716.66
8.0.80.0070.00716.85
8.0.70.0000.00816.83
8.0.60.0040.00416.84
8.0.50.0040.00416.89
8.0.30.0070.01416.98
8.0.20.0130.00817.40
8.0.10.0060.00316.80
8.0.00.0080.00816.50
7.4.330.0000.00515.00
7.4.320.0030.00316.49
7.4.300.0040.00416.48
7.4.290.0040.00416.57
7.4.280.0000.01016.51
7.4.270.0030.00516.52
7.4.260.0030.00316.56
7.4.250.0040.00416.48
7.4.240.0020.00516.54
7.4.230.0000.00716.48
7.4.220.0060.01216.58
7.4.210.0040.01216.56
7.4.200.0000.00716.59
7.4.160.0070.01016.50
7.4.150.0050.01417.40
7.4.140.0140.00317.86
7.4.130.0060.01216.40
7.4.120.0120.00516.45
7.4.110.0100.00716.46
7.4.100.0070.01016.59
7.4.90.0060.01316.65
7.4.80.0180.00019.39
7.4.70.0100.00716.54
7.4.60.0070.01016.57
7.4.50.0000.00816.53
7.4.40.0120.00416.52
7.4.30.0090.00916.19
7.4.00.0170.00014.92
7.3.330.0060.00013.32
7.3.320.0030.00213.32
7.3.310.0000.00716.36
7.3.300.0070.00016.33
7.3.290.0070.00716.32
7.3.280.0050.01116.29
7.3.270.0140.00417.40
7.3.260.0140.00316.59
7.3.250.0110.00616.45
7.3.240.0120.01216.43
7.3.230.0090.01116.49
7.3.210.0140.00316.64
7.3.200.0060.01219.39
7.3.190.0100.01216.30
7.3.180.0120.00416.42
7.3.170.0060.00916.47
7.3.160.0030.01316.56
7.2.330.0100.00716.79
7.2.320.0130.00316.47
7.2.310.0090.00916.67
7.2.300.0040.01516.65
7.2.290.0120.00916.77
7.2.00.0030.00919.59
7.1.100.0060.00918.12
7.1.70.0000.00816.84
7.1.60.0090.00917.32
7.1.50.0070.01716.83
7.1.00.0000.08022.36
7.0.200.0030.01316.58
7.0.140.0030.07321.95
7.0.60.0000.09319.79
7.0.50.0070.08717.84
7.0.40.0070.05020.02
7.0.30.0430.07720.10
7.0.20.0300.05720.16
7.0.10.0030.07320.24
7.0.00.0070.06320.29
5.6.280.0070.07021.09
5.6.210.0030.08020.45
5.6.200.0170.05318.20
5.6.190.0030.05020.41
5.6.180.0200.05320.48
5.6.170.0200.03720.71
5.6.160.0000.04320.69
5.6.150.0100.05718.17
5.6.140.0070.08018.18
5.6.130.0430.07018.17
5.6.120.0100.08020.95
5.6.110.0070.07720.98
5.6.100.0070.04720.96
5.6.90.0130.06321.04
5.6.80.0200.05720.41
5.5.350.0070.06720.30
5.5.340.0100.07317.95
5.5.330.0100.08720.35
5.5.320.0130.07020.21
5.5.310.0200.04020.27
5.5.300.0070.03717.93
5.5.290.0100.07717.96
5.5.280.0030.04320.98
5.5.270.0170.08020.75
5.5.260.0100.08320.77
5.5.250.0130.07020.50
5.5.240.0200.06320.20
5.4.450.0500.05719.38
5.4.440.0500.05319.46
5.4.430.0700.04019.15
5.4.420.0670.00019.41
5.4.410.0700.00019.21
5.4.400.0670.00019.07
5.4.390.0670.00019.21
5.4.380.0670.00019.03
5.4.370.0630.00019.06
5.4.360.0600.00019.13
5.4.350.0900.00019.19
5.4.340.0090.03212.02
5.4.320.0090.03612.50
5.4.310.0090.03512.50
5.4.300.0110.03312.50
5.4.290.0090.04112.50
5.4.280.0090.03512.40
5.4.270.0100.04112.39
5.4.260.0080.04112.39
5.4.250.0080.04512.39
5.4.240.0090.03512.39
5.4.230.0120.03512.38
5.4.220.0100.03312.39
5.4.210.0130.03112.38
5.4.200.0050.04212.38
5.4.190.0100.03312.38
5.4.180.0070.04312.38
5.4.170.0060.04212.39
5.4.160.0060.04412.39
5.4.150.0050.03812.38
5.4.140.0100.03912.07
5.4.130.0130.05012.06
5.4.120.0090.03412.02
5.4.110.0120.03812.01
5.4.100.0090.03712.01
5.4.90.0050.03912.01
5.4.80.0050.03912.01
5.4.70.0040.03712.01
5.4.60.0040.03812.01
5.4.50.0070.04012.00
5.4.40.0080.03312.00
5.4.30.0110.03111.99
5.4.20.0070.03411.99
5.4.10.0100.03111.99
5.4.00.0080.03311.48
5.3.290.0060.04712.80
5.3.280.0040.03912.70
5.3.270.0010.04412.72
5.3.260.0070.03912.72
5.3.250.0110.03812.72
5.3.240.0070.03712.72
5.3.230.0080.04112.71
5.3.220.0060.04012.68
5.3.210.0100.03812.68
5.3.200.0080.03812.68
5.3.190.0120.03112.68
5.3.180.0080.03712.67
5.3.170.0120.03212.67
5.3.160.0090.04012.68
5.3.150.0070.04112.67
5.3.140.0090.04512.66
5.3.130.0070.03812.66
5.3.120.0100.03512.66
5.3.110.0090.04112.66
5.3.100.0070.04012.12
5.3.90.0060.03712.09
5.3.80.0070.03512.09
5.3.70.0050.03712.09
5.3.60.0060.03712.07
5.3.50.0050.03612.02
5.3.40.0060.03612.02
5.3.30.0050.03611.99
5.3.20.0060.03411.76
5.3.10.0040.03811.73
5.3.00.0070.03411.71
5.2.170.0040.0339.21
5.2.160.0050.0339.21
5.2.150.0060.0339.21
5.2.140.0050.0319.21
5.2.130.0020.0329.18
5.2.120.0020.0339.17
5.2.110.0050.0299.18
5.2.100.0040.0289.18
5.2.90.0030.0309.18
5.2.80.0040.0369.18
5.2.70.0080.0289.18
5.2.60.0050.0379.12
5.2.50.0090.0339.09
5.2.40.0060.0279.07
5.2.30.0090.0259.05
5.2.20.0020.0319.04
5.2.10.0030.0298.94
5.2.00.0060.0278.81
5.1.60.0040.0278.08
5.1.50.0040.0288.08
5.1.40.0040.0258.06
5.1.30.0040.0288.42
5.1.20.0030.0288.44
5.1.10.0080.0258.16
5.1.00.0050.0358.16
5.0.50.0070.0186.64
5.0.40.0040.0196.50
5.0.30.0020.0326.31
5.0.20.0020.0206.29
5.0.10.0020.0226.25
5.0.00.0050.0306.25
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0050.0144.75
4.4.60.0030.0154.76
4.4.50.0030.0164.77
4.4.40.0080.0244.71
4.4.30.0030.0154.76
4.4.20.0010.0174.84
4.4.10.0030.0164.85
4.4.00.0060.0214.76
4.3.110.0010.0184.67
4.3.100.0010.0174.66
4.3.90.0020.0164.64
4.3.80.0040.0244.59
4.3.70.0040.0134.63
4.3.60.0040.0134.63
4.3.50.0030.0144.63
4.3.40.0040.0224.54
4.3.30.0020.0163.30
4.3.20.0030.0153.29
4.3.10.0040.0143.23
4.3.00.0170.0177.10

preferences:
43.3 ms | 401 KiB | 5 Q