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); var_dump($s instanceof stdClass);

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.0030.01018.18
8.3.50.0120.00921.86
8.3.40.0140.00018.42
8.3.30.0100.00318.79
8.3.20.0080.00020.21
8.3.10.0080.00023.48
8.3.00.0080.00019.25
8.2.180.0160.00616.38
8.2.170.0180.00022.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00422.18
8.2.110.0060.00322.23
8.2.100.0100.00017.72
8.2.90.0000.00918.97
8.2.80.0050.00317.97
8.2.70.0050.00317.50
8.2.60.0000.00817.68
8.2.50.0080.00018.07
8.2.40.0030.00619.88
8.2.30.0070.00017.98
8.2.20.0000.00817.44
8.2.10.0050.00217.97
8.2.00.0040.00417.53
8.1.280.0060.01225.92
8.1.270.0030.00621.84
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0060.00323.84
8.1.230.0090.00318.95
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0040.00418.38
8.1.160.0030.00521.91
8.1.150.0040.00418.82
8.1.140.0000.00717.32
8.1.130.0030.00317.62
8.1.120.0040.00417.23
8.1.110.0000.00817.38
8.1.100.0040.00417.33
8.1.90.0030.00317.19
8.1.80.0030.00317.22
8.1.70.0030.00317.20
8.1.60.0080.00017.38
8.1.50.0040.00417.46
8.1.40.0040.00417.39
8.1.30.0050.00517.52
8.1.20.0070.00017.51
8.1.10.0040.00417.40
8.1.00.0080.00017.32
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0070.00018.21
8.0.270.0000.00717.02
8.0.260.0030.00317.12
8.0.250.0000.00716.82
8.0.240.0040.00416.93
8.0.230.0070.00016.86
8.0.220.0060.00316.87
8.0.210.0050.00316.79
8.0.200.0030.00316.95
8.0.190.0030.00516.88
8.0.180.0000.00716.89
8.0.170.0030.00516.71
8.0.160.0070.00016.88
8.0.150.0000.00716.82
8.0.140.0000.00716.75
8.0.130.0030.00313.23
8.0.120.0080.00016.84
8.0.110.0080.00016.71
8.0.100.0040.00416.70
8.0.90.0050.00216.89
8.0.80.0100.00616.74
8.0.70.0000.00716.78
8.0.60.0040.00416.64
8.0.50.0070.00016.82
8.0.30.0090.01016.79
8.0.20.0100.00817.40
8.0.10.0000.00716.84
8.0.00.0080.01216.59
7.4.330.0040.00015.00
7.4.320.0000.00616.49
7.4.300.0030.00316.58
7.4.290.0080.00016.51
7.4.280.0050.00616.46
7.4.270.0000.00716.42
7.4.260.0070.00016.62
7.4.250.0070.00016.41
7.4.240.0050.00216.49
7.4.230.0030.00516.50
7.4.220.0090.00916.62
7.4.210.0060.00916.56
7.4.200.0070.00016.66
7.4.160.0100.00716.51
7.4.150.0100.01017.40
7.4.140.0080.01117.86
7.4.130.0160.00516.45
7.4.120.0110.00616.59
7.4.110.0140.00316.65
7.4.100.0090.00916.57
7.4.90.0060.01216.54
7.4.80.0030.01919.39
7.4.70.0060.00916.51
7.4.60.0100.00616.48
7.4.50.0000.00916.49
7.4.40.0060.01216.50
7.4.30.0110.00716.60
7.4.00.0050.00914.77
7.3.330.0030.00313.27
7.3.320.0050.00013.15
7.3.310.0040.00416.36
7.3.300.0040.00416.33
7.3.290.0080.00516.34
7.3.280.0090.00716.34
7.3.270.0210.00317.40
7.3.260.0090.00916.36
7.3.250.0080.00916.43
7.3.240.0190.00416.32
7.3.230.0120.00916.54
7.3.210.0090.00916.74
7.3.200.0030.01619.39
7.3.190.0030.01516.52
7.3.180.0060.01016.61
7.3.170.0080.00816.42
7.3.160.0100.00716.63
7.3.120.0090.00914.75
7.3.110.0110.00714.57
7.3.100.0070.00714.55
7.3.90.0100.00714.94
7.3.80.0070.00715.08
7.3.70.0070.00714.91
7.3.60.0040.01114.89
7.3.50.0100.00714.84
7.3.40.0000.01714.90
7.3.30.0000.00914.66
7.3.20.0000.01016.74
7.3.10.0090.00616.62
7.3.00.0030.01316.40
7.2.330.0030.01416.87
7.2.320.0100.00716.91
7.2.310.0090.00916.82
7.2.300.0060.01616.45
7.2.290.0100.00716.84
7.2.250.0070.01115.05
7.2.240.0100.01014.99
7.2.230.0040.01114.91
7.2.220.0040.00815.02
7.2.210.0130.00315.27
7.2.200.0090.00014.61
7.2.190.0000.01714.78
7.2.180.0060.00915.04
7.2.170.0090.00614.85
7.2.00.0000.01419.64
7.1.330.0000.01215.73
7.1.320.0070.00715.47
7.1.310.0000.01415.82
7.1.300.0070.00415.76
7.1.290.0000.01515.64
7.1.280.0040.00815.92
7.1.270.0000.01715.78
7.1.260.0130.00015.69
7.1.200.0090.00015.54
7.1.100.0040.00818.20
7.1.70.0000.01516.93
7.1.60.0170.00719.11
7.1.50.0180.00717.05
7.1.00.0070.07322.53
7.0.200.0000.00716.76
7.0.140.0030.07321.95
7.0.60.0030.06319.93
7.0.50.0130.07317.92
7.0.40.0030.04720.30
7.0.30.0530.05720.27
7.0.20.0230.08320.16
7.0.10.0070.05020.30
7.0.00.0130.07020.28
5.6.280.0000.07320.81
5.6.210.0100.07020.48
5.6.200.0130.07718.20
5.6.190.0030.05320.47
5.6.180.0200.04320.41
5.6.170.0170.04020.57
5.6.160.0000.05020.70
5.6.150.0000.06718.16
5.6.140.0070.08718.14
5.6.130.0170.07018.14
5.6.120.0130.04320.89
5.6.110.0100.05021.11
5.6.100.0130.06021.00
5.6.90.0030.05021.08
5.6.80.0100.06720.48
5.5.350.0170.06720.40
5.5.340.0100.06317.98
5.5.330.0030.04720.32
5.5.320.0770.06720.36
5.5.310.0200.03720.19
5.5.300.0030.08318.03
5.5.290.0130.07018.03
5.5.280.0000.04720.82
5.5.270.0130.07320.96
5.5.260.0070.08320.87
5.5.250.0070.06020.69
5.5.240.0270.06320.26
5.4.450.0800.06019.47
5.4.440.0730.06319.18
5.4.430.0730.05719.68
5.4.420.0700.00019.53
5.4.410.0630.00019.27
5.4.400.0670.00019.16
5.4.390.0630.00019.11
5.4.380.0800.00019.05
5.4.370.0830.00019.21
5.4.360.0630.00019.16
5.4.350.0670.00019.12
5.4.340.0050.03512.02
5.4.320.0050.03712.50
5.4.310.0050.03812.50
5.4.300.0030.03912.50
5.4.290.0030.03912.50
5.4.280.0080.03112.39
5.4.270.0030.03912.40
5.4.260.0070.03512.39
5.4.250.0040.03812.39
5.4.240.0050.04012.39
5.4.230.0050.03812.39
5.4.220.0080.03212.39
5.4.210.0050.03812.39
5.4.200.0100.04212.39
5.4.190.0050.04012.38
5.4.180.0050.03512.38
5.4.170.0040.03712.39
5.4.160.0070.03712.39
5.4.150.0090.03612.39
5.4.140.0060.03512.07
5.4.130.0050.03612.06
5.4.120.0040.03512.02
5.4.110.0060.03412.01
5.4.100.0070.03312.02
5.4.90.0070.03612.01
5.4.80.0060.03712.01
5.4.70.0050.03512.01
5.4.60.0060.03312.01
5.4.50.0040.03612.00
5.4.40.0050.03412.00
5.4.30.0050.03411.99
5.4.20.0050.03512.00
5.4.10.0050.03812.00
5.4.00.0040.04111.48
5.3.290.0090.04512.80
5.3.280.0090.03512.71
5.3.270.0040.04012.72
5.3.260.0030.04112.72
5.3.250.0040.03812.72
5.3.240.0030.03912.72
5.3.230.0090.03312.71
5.3.220.0080.03312.68
5.3.210.0050.03912.68
5.3.200.0070.03512.68
5.3.190.0080.03512.67
5.3.180.0050.03812.67
5.3.170.0080.03512.67
5.3.160.0050.03712.67
5.3.150.0070.03712.68
5.3.140.0080.03612.66
5.3.130.0070.03712.66
5.3.120.0090.03612.66
5.3.110.0080.03812.66
5.3.100.0080.03512.12
5.3.90.0050.03612.09
5.3.80.0060.03512.09
5.3.70.0050.03612.09
5.3.60.0050.03612.09
5.3.50.0100.03912.02
5.3.40.0090.03312.02
5.3.30.0070.03311.99
5.3.20.0100.03111.76
5.3.10.0070.03311.72
5.3.00.0060.03511.71
5.2.170.0030.0319.22
5.2.160.0050.0289.21
5.2.150.0090.0259.22
5.2.140.0030.0319.21
5.2.130.0030.0309.17
5.2.120.0030.0309.17
5.2.110.0040.0309.18
5.2.100.0080.0249.18
5.2.90.0060.0279.18
5.2.80.0040.0309.18
5.2.70.0040.0309.18
5.2.60.0030.0309.13
5.2.50.0090.0249.09
5.2.40.0060.0269.07
5.2.30.0040.0299.05
5.2.20.0050.0289.04
5.2.10.0030.0288.94
5.2.00.0050.0278.81
5.1.60.0050.0288.09
5.1.50.0030.0258.08
5.1.40.0030.0248.07
5.1.30.0030.0268.42
5.1.20.0020.0288.44
5.1.10.0060.0238.16
5.1.00.0040.0258.16
5.0.50.0050.0196.64
5.0.40.0060.0166.50
5.0.30.0030.0316.31
5.0.20.0050.0176.28
5.0.10.0030.0196.26
5.0.00.0040.0296.25
4.4.90.0030.0154.78
4.4.80.0030.0154.75
4.4.70.0040.0144.76
4.4.60.0040.0144.75
4.4.50.0020.0154.77
4.4.40.0040.0234.71
4.4.30.0020.0184.76
4.4.20.0010.0174.85
4.4.10.0020.0164.85
4.4.00.0040.0244.76
4.3.110.0020.0164.67
4.3.100.0040.0144.67
4.3.90.0050.0124.63
4.3.80.0000.0274.58
4.3.70.0040.0124.63
4.3.60.0030.0174.63
4.3.50.0030.0184.63
4.3.40.0020.0264.54
4.3.30.0010.0233.30
4.3.20.0020.0203.28
4.3.10.0020.0153.24
4.3.00.0200.0277.43

preferences:
38.91 ms | 401 KiB | 5 Q