3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { var $a = 5; public $bg = ['g'=>44,'h'=>55]; public function __set($name, $value) { echo $bg[$name]; if(!(isset($bg[$name]))) { throw new Exception("Cannot add new property \$$name to instance of " . __CLASS__); } } } $a=new A; echo $a->a; $a->a = 9; echo $a->a; $a->g = 88; echo $a->g;

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.0110.00716.75
8.3.50.0110.00516.65
8.3.40.0070.01018.96
8.3.30.0080.00818.67
8.3.20.0030.00518.72
8.3.10.0060.00318.69
8.3.00.0030.00619.27
8.2.180.0100.01016.88
8.2.170.0070.01422.96
8.2.160.0100.00320.35
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0040.00419.79
8.2.110.0040.00719.10
8.2.100.0090.00318.16
8.2.90.0050.00319.36
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0060.00317.92
8.2.50.0000.00818.10
8.2.40.0030.00518.22
8.2.30.0030.00917.82
8.2.20.0030.00717.83
8.2.10.0000.00719.64
8.2.00.0000.00717.83
8.1.280.0130.00725.92
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0070.01023.82
8.1.230.0060.00917.95
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0080.00017.23
8.1.180.0090.00018.10
8.1.170.0060.00318.46
8.1.160.0030.00318.89
8.1.150.0050.00318.55
8.1.140.0000.00717.50
8.1.130.0000.00717.37
8.1.120.0040.00417.38
8.1.110.0050.00217.34
8.1.100.0040.00417.46
8.1.90.0080.00017.35
8.1.80.0080.00017.36
8.1.70.0000.00817.42
8.1.60.0070.00017.63
8.1.50.0000.00917.41
8.1.40.0000.00817.39
8.1.30.0030.00517.67
8.1.20.0040.00717.63
8.1.10.0040.00417.42
8.1.00.0030.00617.42
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0030.00518.32
8.0.270.0040.00417.18
8.0.260.0030.00316.89
8.0.250.0060.00717.09
8.0.240.0040.00417.09
8.0.230.0040.00417.05
8.0.220.0050.00516.87
8.0.210.0070.00016.85
8.0.200.0040.00416.87
8.0.190.0050.00516.98
8.0.180.0070.00016.96
8.0.170.0040.00416.88
8.0.160.0040.00416.95
8.0.150.0000.00916.94
8.0.140.0000.00716.82
8.0.130.0050.00013.40
8.0.120.0060.00316.91
8.0.110.0080.00017.00
8.0.100.0000.00716.81
8.0.90.0020.00517.03
8.0.80.0100.00316.93
8.0.70.0000.00716.76
8.0.60.0000.00816.82
8.0.50.0080.00016.76
8.0.30.0060.01117.12
8.0.20.0080.01617.04
8.0.10.0000.00716.97
8.0.00.0140.00816.87
7.4.330.0030.00313.01
7.4.320.0030.00316.64
7.4.300.0030.00316.52
7.4.290.0070.00316.53
7.4.280.0080.00016.61
7.4.270.0000.00716.55
7.4.260.0000.00513.19
7.4.250.0070.00016.40
7.4.240.0040.00416.56
7.4.230.0040.00416.71
7.4.220.0090.01816.61
7.4.210.0100.01016.68
7.4.200.0030.00316.42
7.4.190.0060.00316.46
7.4.160.0060.01116.72
7.4.150.0090.00916.59
7.4.140.0160.00317.86
7.4.130.0130.00716.63
7.4.120.0120.00616.55
7.4.110.0030.01416.61
7.4.100.0130.00316.51
7.4.90.0080.01216.49
7.4.80.0120.00619.39
7.4.70.0090.00816.56
7.4.60.0110.00416.61
7.4.50.0000.00616.52
7.4.40.0100.00316.62
7.4.30.0120.00816.48
7.4.00.0030.01415.05
7.3.330.0000.00613.29
7.3.320.0060.00013.23
7.3.310.0000.00816.41
7.3.300.0030.00316.42
7.3.290.0090.00816.42
7.3.280.0030.01016.41
7.3.270.0130.01316.45
7.3.260.0080.00916.77
7.3.240.0130.00516.53
7.3.230.0130.00316.36
7.3.210.0100.00716.49
7.3.200.0070.01316.51
7.3.190.0160.00016.50
7.3.180.0140.00316.57
7.3.170.0080.00816.50
7.3.160.0080.00816.45
7.3.120.0060.00615.02
7.2.330.0030.01416.64
7.2.320.0060.01616.49
7.2.310.0150.00816.55
7.2.300.0070.01016.86
7.2.290.0070.01116.72
7.2.80.0060.00316.54
7.2.60.0060.00616.95
7.2.00.0040.00819.46
7.1.200.0070.00715.55
7.1.100.0040.00818.29
7.1.70.0040.00417.22
7.1.60.0110.01419.25
7.1.50.0040.00816.78
7.1.00.0000.07722.28
7.0.200.0000.00816.84
7.0.140.0030.07022.17
7.0.120.0000.07322.04
7.0.60.0100.07320.03
7.0.50.0070.05017.86
7.0.40.0100.07720.20
7.0.30.0230.07720.30
7.0.20.0330.05720.16
7.0.10.0330.07020.08
7.0.00.0000.09320.21
5.6.280.0000.07721.07
5.6.210.0200.06720.57
5.6.200.0030.05018.16
5.6.190.0070.07720.34
5.6.180.0170.04720.63
5.6.170.0330.07320.54
5.6.160.0100.03320.51
5.6.150.0100.07718.15
5.6.140.0130.05718.18
5.6.130.0030.08718.18
5.6.120.0100.05721.03
5.6.110.0100.07321.05
5.6.100.0130.08321.13
5.6.90.0100.07321.03
5.6.80.0100.06320.53
5.6.70.0030.07320.40
5.5.350.0170.08320.41
5.5.340.0070.08017.98
5.5.330.0070.05320.57
5.5.320.0200.04720.30
5.5.310.0200.05020.41
5.5.300.0070.04017.97
5.5.290.0070.05318.07
5.5.280.0000.05720.66
5.5.270.0170.07720.73
5.5.260.0070.09020.88
5.5.250.0030.07020.70
5.5.240.0130.07720.23
5.4.450.0300.05019.19
5.4.440.3930.03719.39
5.4.430.0130.05019.38
5.4.420.0300.05719.52
5.4.410.0100.05319.32
5.4.400.0070.05319.23
5.4.390.0000.06319.06
5.4.380.0130.05718.84
5.4.370.0130.03318.70
5.4.360.0000.04318.49
5.4.350.0080.03512.02
5.4.340.0080.03312.02
5.4.320.0050.04212.50
5.4.310.0040.04012.50
5.4.300.0100.05412.50
5.4.290.0090.05012.50
5.4.280.0090.05012.39
5.4.270.0070.04612.40
5.4.260.0110.04812.39
5.4.250.0100.05012.40
5.4.240.0110.04612.39
5.4.230.0100.04712.39
5.4.220.0090.05212.39
5.4.210.0080.04712.39
5.4.200.0100.05012.39
5.4.190.0080.05212.39
5.4.180.0140.05912.38
5.4.170.0060.05112.40
5.4.160.0070.04612.39
5.4.150.0070.04712.39
5.4.140.0100.05212.07
5.4.130.0070.04412.06
5.4.120.0080.04112.02
5.4.110.0060.04212.01
5.4.100.0070.04112.01
5.4.90.0080.05012.01
5.4.80.0110.06112.01
5.4.70.0110.05812.01
5.4.60.0080.04312.01
5.4.50.0100.04812.01
5.4.40.0070.04712.00
5.4.30.0100.04211.99
5.4.20.0070.05111.99
5.4.10.0100.04811.99
5.4.00.0110.04711.49
5.3.290.0040.04412.80
5.3.280.0120.04712.71
5.3.270.0090.05212.72
5.3.260.0080.05612.72
5.3.250.0090.05412.72
5.3.240.0100.05312.72
5.3.230.0090.04812.71
5.3.220.0090.04712.68
5.3.210.0090.04912.68
5.3.200.0100.05112.68
5.3.190.0130.04312.67
5.3.180.0100.04812.67
5.3.170.0110.04912.67
5.3.160.0090.04712.68
5.3.150.0070.05012.67
5.3.140.0100.05312.66
5.3.130.0090.05812.66
5.3.120.0090.05412.66
5.3.110.0090.05812.66
5.3.100.0110.05412.12
5.3.90.0090.05712.10
5.3.80.0100.05412.09
5.3.70.0080.05412.09
5.3.60.0090.04512.08
5.3.50.0080.04412.02

preferences:
38.03 ms | 400 KiB | 5 Q