3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyArrayObject extends ArrayObject{ function __construct($input=[]){ parent::__construct($input); } function offsetSet($x,$v){ echo "offsetSet('{$x}')\n"; return parent::offsetSet($x,$v); } function offsetGet($x){ echo "offsetGet('{$x}')\n"; return parent::offsetGet($x); } function __get($x){ echo "__get('{$x}')\n"; } function __set($x,$v){ echo "__set('{$x}')\n"; } function offsetExists($x){ echo "offsetExists('{$x}')\n"; return parent::offsetExists($x); } } $x=new MyArrayObject; $x->hello=5; $x['hi']=10; $x['hello']++; @$x->a->b=7; $x->a->b++;

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.0130.00316.63
8.3.50.0060.00818.18
8.3.40.0120.00618.91
8.3.30.0040.01218.79
8.3.20.0040.00420.31
8.3.10.0040.00421.77
8.3.00.0050.00519.34
8.2.180.0070.00716.88
8.2.170.0170.00019.09
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00021.12
8.2.110.0060.00321.18
8.2.100.0070.00418.16
8.2.90.0080.00019.25
8.2.80.0050.00318.05
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0090.00018.16
8.2.40.0000.00820.55
8.2.30.0000.00819.20
8.2.20.0040.00418.13
8.2.10.0000.00718.43
8.2.00.0030.00318.26
8.1.280.0180.00025.92
8.1.270.0070.01124.66
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0090.00021.24
8.1.230.0100.00019.20
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0000.00917.47
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0080.00418.59
8.1.160.0040.00418.87
8.1.150.0000.00720.12
8.1.140.0020.00519.50
8.1.130.0000.00718.98
8.1.120.0000.00917.41
8.1.110.0000.00917.53
8.1.100.0000.00817.33
8.1.90.0050.00317.50
8.1.80.0000.00817.46
8.1.70.0040.00417.51
8.1.60.0040.00817.49
8.1.50.0040.00417.53
8.1.40.0080.00017.52
8.1.30.0040.00417.54
8.1.20.0030.00717.53
8.1.10.0040.00417.48
8.1.00.0000.00717.47
8.0.300.0030.00918.77
8.0.290.0040.00416.75
8.0.280.0000.00818.33
8.0.270.0030.00317.20
8.0.260.0050.00518.87
8.0.250.0000.00717.02
8.0.240.0060.00317.07
8.0.230.0040.00417.05
8.0.220.0030.00316.98
8.0.210.0040.00416.90
8.0.200.0050.00316.90
8.0.190.0030.00717.04
8.0.180.0050.00316.91
8.0.170.0040.00416.88
8.0.160.0080.00016.86
8.0.150.0040.00416.80
8.0.140.0000.00716.97
8.0.130.0030.00313.26
8.0.120.0050.00216.91
8.0.110.0040.00416.81
8.0.100.0050.00216.92
8.0.90.0040.00416.93
8.0.80.0070.01516.95
8.0.70.0000.00716.83
8.0.60.0050.00217.00
8.0.50.0000.00716.87
8.0.30.0100.00917.06
8.0.20.0090.01017.40
8.0.10.0020.00516.87
8.0.00.0100.00716.95
7.4.330.0030.00315.55
7.4.320.0030.00316.58
7.4.300.0030.00316.43
7.4.290.0050.00316.53
7.4.280.0000.00716.50
7.4.270.0000.00716.47
7.4.260.0060.00316.51
7.4.250.0080.00016.58
7.4.240.0000.00716.54
7.4.230.0000.00716.67
7.4.220.0110.00816.38
7.4.210.0090.01416.51
7.4.200.0000.00716.45
7.4.160.0100.00616.74
7.4.150.0030.01617.40
7.4.140.0150.00617.86
7.4.130.0060.01316.55
7.4.120.0100.01016.58
7.4.110.0070.01416.75
7.4.100.0130.01216.56
7.4.90.0110.00516.61
7.4.80.0110.01219.39
7.4.70.0140.00316.64
7.4.60.0140.00316.41
7.4.50.0100.00316.50
7.4.40.0040.01216.51
7.4.30.0100.01016.55
7.4.10.0120.00115.00
7.4.00.0100.00615.12
7.3.330.0000.00613.46
7.3.320.0060.00013.30
7.3.310.0000.00716.54
7.3.300.0040.00416.45
7.3.290.0060.00016.30
7.3.280.0070.01016.40
7.3.270.0110.00717.40
7.3.260.0070.01516.53
7.3.240.0110.00616.62
7.3.230.0170.00016.70
7.3.210.0090.00916.73
7.3.200.0100.00716.47
7.3.190.0000.01616.29
7.3.180.0090.01316.61
7.3.170.0070.01416.39
7.3.160.0080.00816.39
7.3.130.0060.01114.80
7.3.120.0080.00614.93
7.3.110.0070.01214.85
7.3.100.0080.00614.93
7.3.90.0080.00914.92
7.3.80.0100.00314.75
7.3.70.0050.00914.75
7.3.60.0110.00514.88
7.3.50.0080.00814.94
7.3.40.0040.01214.86
7.3.30.0070.00614.78
7.3.20.0050.01016.76
7.3.10.0060.00916.69
7.3.00.0050.01116.72
7.2.330.0100.00716.80
7.2.320.0070.01716.72
7.2.310.0090.00916.72
7.2.300.0060.01116.80
7.2.290.0060.01716.73
7.2.260.0060.01115.06
7.2.250.0050.01215.16
7.2.240.0070.00915.16
7.2.230.0050.01214.97
7.2.220.0090.00715.12
7.2.210.0080.00615.31
7.2.200.0060.00715.10
7.2.190.0070.00815.01
7.2.180.0080.00515.15
7.2.170.0080.00615.13
7.2.160.0060.00615.05
7.2.150.0050.00916.90
7.2.140.0090.00316.81
7.2.130.0100.00316.98
7.2.120.0080.00516.90
7.2.110.0060.00816.85
7.2.100.0050.00916.95
7.2.90.0080.00816.98
7.2.80.0080.00516.79
7.2.70.0060.00717.02
7.2.60.0040.00916.97
7.2.50.0070.00816.99
7.2.40.0050.01316.96
7.2.30.0030.01017.13
7.2.20.0050.00916.98
7.2.10.0030.01217.02
7.2.00.0070.00916.94
7.1.330.0020.01015.83
7.1.320.0080.00915.54
7.1.310.0050.00915.88
7.1.300.0070.00815.89
7.1.290.0070.00615.77
7.1.280.0050.00915.72
7.1.270.0060.00615.62
7.1.260.0020.01215.76
7.1.250.0080.00515.79
7.1.240.0060.00715.69
7.1.230.0030.01015.94
7.1.220.0090.00515.71
7.1.210.0040.00915.88
7.1.200.0070.00415.73
7.1.190.0050.00815.76
7.1.180.0050.00615.89
7.1.170.0070.00715.63
7.1.160.0060.00915.67
7.1.150.0080.00515.76
7.1.140.0020.01015.81
7.1.130.0080.00715.78
7.1.120.0080.00515.83
7.1.110.0020.01015.88
7.1.100.0020.01215.83
7.1.90.0040.00915.75
7.1.80.0060.00815.68
7.1.70.0040.01016.31
7.1.60.0060.00816.29
7.1.50.0070.01016.17
7.1.40.0090.00822.03
7.1.30.0070.00922.11
7.1.20.0070.01021.96
7.1.10.0030.01015.87
7.1.00.0030.01115.92
7.0.330.0030.00815.38
7.0.320.0020.01315.37
7.0.310.0040.00915.46
7.0.300.0080.00515.40
7.0.290.0060.00615.25
7.0.280.0080.00515.43
7.0.270.0060.00615.63
7.0.260.0020.01115.47
7.0.250.0080.00615.66
7.0.240.0050.00615.39
7.0.230.0010.00815.48
7.0.220.0020.01115.51
7.0.210.0070.00415.51
7.0.200.0100.00515.88
7.0.190.0030.01115.40
7.0.180.0040.00715.71
7.0.170.0060.00615.67
7.0.160.0060.00815.69
7.0.150.0050.01115.61
7.0.140.0030.01115.75
7.0.130.0040.00815.63
7.0.120.0110.00315.77
7.0.110.0030.01315.59
7.0.100.0040.00815.56
7.0.90.0030.01015.53
7.0.80.0040.00915.71
7.0.70.0040.00715.70
7.0.60.0070.00715.73
7.0.50.0070.00915.68
7.0.40.0080.00614.54
7.0.30.0040.00814.53
7.0.20.0080.00414.53
7.0.10.0030.01114.39
7.0.00.0040.00814.46
5.6.400.0080.00514.69
5.6.390.0050.00614.60
5.6.380.0030.01114.43
5.6.370.0040.01214.51
5.6.360.0070.00714.82
5.6.350.0070.00614.45
5.6.340.0060.00614.66
5.6.330.0110.00714.69
5.6.320.0070.00814.40
5.6.310.0090.00514.34
5.6.300.0100.00714.37
5.6.290.0020.00914.44
5.6.280.0020.01014.34
5.6.270.0050.01014.58
5.6.260.0060.00814.42
5.6.250.0070.00514.49
5.6.240.0100.00414.42
5.6.230.0060.00914.66
5.6.220.0060.00914.53
5.6.210.0100.00714.57
5.6.200.0090.00314.47
5.6.190.0120.00514.83
5.6.180.0070.00514.48
5.6.170.0020.01214.45
5.6.160.0100.00514.41
5.6.150.0020.01214.61
5.6.140.0060.01014.42
5.6.130.0050.00914.42
5.6.120.0040.00814.46
5.6.110.0040.00914.49
5.6.100.0020.00914.85
5.6.90.0070.00514.40
5.6.80.0060.00714.29
5.6.70.0050.00514.15
5.6.60.0060.00814.42
5.6.50.0050.00514.38
5.6.40.0050.00714.43
5.6.30.0050.00514.42
5.6.20.0040.00414.29
5.6.10.0120.00014.36
5.6.00.0080.00514.41

preferences:
80.3 ms | 400 KiB | 5 Q