3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { private $string; private $array; public function __set($attribute, $value) { $this->$attribute = $value; } public function __get($attribute) { if (isset($attribute)) { return $this->$attribute; } } } $obg = new MyClass(); $obg->string = 'Hey it works!'; $obg->array = new ArrayObject(['This works', 'too!']); $obg->array['key'] = "This will throw 'Indirect modification of overloaded property MyClass::\$array has no effect'"; print_r($obg->array);

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.00416.61
8.3.50.0250.00516.31
8.3.40.0070.01418.73
8.3.30.0170.00318.47
8.3.20.0000.00818.69
8.3.10.0090.00018.60
8.3.00.0060.00319.38
8.2.180.0120.00416.50
8.2.170.0130.00322.96
8.2.160.0080.00818.88
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0000.00720.94
8.2.110.0060.00322.16
8.2.100.0050.00519.51
8.2.90.0050.00317.75
8.2.80.0040.00418.64
8.2.70.0000.00817.50
8.2.60.0040.00417.63
8.2.50.0000.00817.93
8.2.40.0030.00519.35
8.2.30.0030.00617.66
8.2.20.0080.00317.52
8.2.10.0000.00717.66
8.2.00.0060.00617.73
8.1.280.0100.01025.92
8.1.270.0080.00023.99
8.1.260.0090.00926.35
8.1.250.0060.00328.09
8.1.240.0000.00821.03
8.1.230.0000.01119.15
8.1.220.0000.00818.62
8.1.210.0060.00318.77
8.1.200.0030.00517.36
8.1.190.0030.00617.35
8.1.180.0050.00318.10
8.1.170.0080.00017.62
8.1.160.0030.00719.00
8.1.150.0040.00418.64
8.1.140.0000.00717.38
8.1.130.0040.00419.14
8.1.120.0070.00017.45
8.1.110.0090.00017.50
8.1.100.0040.00417.40
8.1.90.0000.00717.34
8.1.80.0050.00217.36
8.1.70.0030.00317.39
8.1.60.0060.00317.59
8.1.50.0030.00617.33
8.1.40.0030.00617.50
8.1.30.0060.00317.48
8.1.20.0040.00417.60
8.1.10.0040.00417.58
8.1.00.0050.00217.56
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0030.00318.63
8.0.270.0040.00417.32
8.0.260.0060.00018.36
8.0.250.0030.00716.96
8.0.240.0060.00316.96
8.0.230.0000.00617.00
8.0.220.0000.00716.96
8.0.210.0030.00316.80
8.0.200.0030.00316.93
8.0.190.0000.00816.95
8.0.180.0040.00416.94
8.0.170.0030.00516.80
8.0.160.0070.00016.82
8.0.150.0000.00816.86
8.0.140.0000.00916.86
8.0.130.0050.00013.28
8.0.120.0090.00016.76
8.0.110.0030.00316.88
8.0.100.0060.00316.92
8.0.90.0000.00716.77
8.0.80.0040.01616.96
8.0.70.0000.00716.95
8.0.60.0030.00616.86
8.0.50.0070.00016.96
8.0.30.0040.01316.97
8.0.20.0080.01116.99
8.0.10.0070.00016.82
8.0.00.0080.01116.89
7.4.330.0000.00512.92
7.4.320.0030.00316.54
7.4.300.0060.00016.56
7.4.290.0000.00916.56
7.4.280.0000.00816.56
7.4.270.0000.00816.53
7.4.260.0000.00513.20
7.4.250.0050.00216.50
7.4.240.0050.00216.53
7.4.230.0050.00316.45
7.4.220.0140.00316.46
7.4.210.0040.01216.46
7.4.200.0070.00016.58
7.4.190.0080.00016.38
7.4.160.0040.01116.46
7.4.150.0100.00716.43
7.4.140.0130.01316.46
7.4.130.0050.01116.46
7.4.120.0110.00716.58
7.4.110.0090.00916.37
7.4.100.0110.00716.48
7.4.90.0120.00616.41
7.4.80.0070.01319.39
7.4.70.0100.00616.30
7.4.60.0100.00616.57
7.4.50.0050.00316.29
7.4.40.0060.00616.46
7.4.30.0140.00416.37
7.4.00.0080.01014.85
7.3.330.0030.00313.37
7.3.320.0000.00513.30
7.3.310.0040.00416.22
7.3.300.0000.00716.29
7.3.290.0110.00416.31
7.3.280.0090.01116.35
7.3.270.0070.01016.33
7.3.260.0140.00416.78
7.3.250.0100.00716.45
7.3.240.0120.00916.67
7.3.230.0100.01416.65
7.3.210.0160.00016.32
7.3.200.0080.01516.57
7.3.190.0130.00316.50
7.3.180.0030.01316.45
7.3.170.0070.00716.32
7.3.160.0060.01216.32
7.3.120.0070.00914.98
7.3.110.0050.01114.93
7.3.100.0090.00714.76
7.3.90.0050.00714.80
7.3.80.0050.01014.73
7.3.70.0050.00614.79
7.3.60.0060.00614.72
7.3.50.0070.00714.95
7.3.40.0080.00814.67
7.3.30.0070.00714.85
7.3.20.0070.00316.50
7.3.10.0100.00416.62
7.3.00.0050.00916.55
7.2.330.0040.01416.36
7.2.320.0030.01816.65
7.2.310.0170.00316.66
7.2.300.0190.00316.47
7.2.290.0080.00816.45
7.2.250.0050.01115.02
7.2.240.0050.01414.86
7.2.230.0090.00715.13
7.2.220.0050.00914.81
7.2.210.0050.01115.04
7.2.200.0070.00915.08
7.2.190.0060.00715.08
7.2.180.0090.00714.95
7.2.170.0070.00815.01
7.1.330.0090.00615.67
7.1.320.0050.00715.91
7.1.310.0080.00515.67
7.1.300.0070.00415.79
7.1.290.0030.01115.66
7.1.280.0060.00815.58
7.1.270.0080.00615.62
7.1.260.0080.00715.69
7.1.70.0030.01016.93
7.1.60.0090.01619.30
7.1.50.0070.01316.94
7.1.00.0070.07022.36
7.0.200.0000.00716.63
7.0.140.0070.06322.04
7.0.120.0000.07722.05
7.0.60.0030.04719.93
7.0.50.0030.04317.69
7.0.40.0070.08020.15
7.0.30.0200.04020.07
7.0.20.0270.07720.25
7.0.10.0130.03720.16
7.0.00.0070.06020.30
5.6.280.0130.06321.10
5.6.210.0070.03720.48
5.6.200.0030.06018.16
5.6.190.0100.08320.61
5.6.180.0370.06320.42
5.6.170.0270.05320.62
5.6.160.0030.07020.46
5.6.150.0070.04018.18
5.6.140.0130.03018.11
5.6.130.0070.05318.16
5.6.120.0130.07321.13
5.6.110.0130.07721.04
5.6.100.0030.04020.96
5.6.90.0130.03021.04
5.6.80.0130.03320.39
5.5.350.0230.06320.45
5.5.340.0070.03717.95
5.5.330.0100.06720.47
5.5.320.0300.07320.22
5.5.310.0300.08320.51
5.5.300.0000.04017.95
5.5.290.0070.04718.03
5.5.280.0100.04020.77
5.5.270.0070.05020.88
5.5.260.0230.03320.85
5.5.250.0030.04720.63
5.5.240.0100.07020.27
5.4.450.0470.05019.46
5.4.440.0400.05319.39
5.4.430.0330.03319.41
5.4.420.0300.05719.54
5.4.410.0330.04019.25
5.4.400.0430.03319.22
5.4.390.0770.03019.22
5.4.380.0430.04019.16
5.4.370.0970.03319.00
5.4.360.0470.04019.05
5.4.350.0570.05019.06
5.4.340.0470.04019.06
5.4.320.0830.03719.06
5.4.310.0530.05719.04
5.4.300.0830.03019.06
5.4.290.1030.03318.99
5.4.280.0500.04019.22
5.4.270.0870.02319.06
5.4.260.0530.04719.31
5.4.250.0470.04019.16
5.4.240.0800.04319.19
5.4.230.0700.05319.21
5.4.220.0330.03719.21
5.4.210.0930.03018.83
5.4.200.0870.03319.21
5.4.190.0670.03719.21
5.4.180.0500.03319.21
5.4.170.0430.04319.06
5.4.160.0770.04019.20
5.4.150.0800.02319.11
5.4.140.0570.03016.42
5.4.130.0670.03016.41
5.4.120.0630.03016.50
5.4.110.0470.03716.40
5.4.100.0570.03316.38
5.4.90.0400.04016.54
5.4.80.0230.03716.57
5.4.70.0770.04016.58
5.4.60.0530.04016.49
5.4.50.0270.03716.16
5.4.40.0270.04716.35
5.4.30.0470.03316.42
5.4.20.0430.04316.32
5.4.10.0230.04716.42
5.4.00.0500.03315.93
5.3.290.0370.04315.88
5.3.280.0730.04015.74
5.3.270.0770.03315.65
5.3.260.0370.04015.65
5.3.250.0670.03315.65
5.3.240.0970.02015.65
5.3.230.0330.03715.65
5.3.220.0730.03715.65
5.3.210.0130.04715.65
5.3.200.0570.04715.65
5.3.190.0530.04015.60
5.3.180.0800.03315.51
5.3.170.0730.04015.51
5.3.160.0630.03315.51
5.3.150.0270.04315.51
5.3.140.0270.03015.51
5.3.130.0630.03315.51
5.3.120.0470.04015.51
5.3.110.0630.05315.51
5.3.100.0330.03315.51
5.3.90.0270.04315.51
5.3.80.0430.04015.51
5.3.70.0670.03315.51
5.3.60.0630.04315.51
5.3.50.0930.03315.51
5.3.40.0670.03715.51
5.3.30.0700.06715.51
5.3.20.0600.04015.51
5.3.10.0470.03715.51
5.3.00.0300.03715.51
5.2.170.0400.02315.51
5.2.160.0500.02015.51
5.2.150.0430.03715.51
5.2.140.0270.03715.51
5.2.130.0570.03715.51
5.2.120.0300.04015.51
5.2.110.0530.03315.51
5.2.100.0370.02715.51
5.2.90.0670.03015.51
5.2.80.0170.03315.51
5.2.70.0030.08715.51
5.2.60.0530.03015.51
5.2.50.0470.02715.51
5.2.40.0030.02715.51
5.2.30.0500.03015.51
5.2.20.0200.02315.51
5.2.10.0200.02315.51
5.2.00.0370.03715.51
5.1.60.0400.03015.51
5.1.50.0370.03015.51
5.1.40.0630.02015.51
5.1.30.0270.03715.51
5.1.20.0370.02315.51
5.1.10.0330.02315.51
5.1.00.0170.03015.51
5.0.50.0370.01715.51
5.0.40.0170.01315.51
5.0.30.0270.03315.51
5.0.20.0230.01315.51
5.0.10.0270.02715.51
5.0.00.0230.03015.51
4.4.90.0470.02715.51
4.4.80.0130.02015.51
4.4.70.0230.01315.51
4.4.60.0370.01315.51
4.4.50.0200.01315.51
4.4.40.0030.05015.51
4.4.30.0130.01715.51
4.4.20.0230.01315.51
4.4.10.0130.01315.51
4.4.00.0170.02315.51
4.3.110.0270.01315.51
4.3.100.0300.01315.51
4.3.90.0130.01715.51
4.3.80.0070.02315.51
4.3.70.0200.01715.51
4.3.60.0230.01715.51
4.3.50.0330.02015.51
4.3.40.0230.02015.51
4.3.30.0100.01715.51
4.3.20.0000.01715.51
4.3.10.0070.02315.51
4.3.00.0170.02015.51

preferences:
45 ms | 401 KiB | 5 Q