3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyArrayObject extends ArrayObject{ function __construct($input=[]){ parent::__construct($input,ArrayObject::ARRAY_AS_PROPS); } 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.0080.00818.55
8.3.50.0140.00418.17
8.3.40.0110.00418.70
8.3.30.0070.00718.71
8.3.20.0030.00620.34
8.3.10.0060.00321.77
8.3.00.0000.00819.47
8.2.180.0150.00325.92
8.2.170.0070.00719.08
8.2.160.0030.01022.96
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00820.39
8.2.120.0040.00426.35
8.2.110.0060.00321.05
8.2.100.0070.00318.28
8.2.90.0040.00419.21
8.2.80.0000.00917.97
8.2.70.0040.00417.63
8.2.60.0050.00317.93
8.2.50.0000.00918.10
8.2.40.0040.00420.59
8.2.30.0050.00219.21
8.2.20.0000.00718.00
8.2.10.0000.00718.32
8.2.00.0040.00418.37
8.1.280.0120.00625.92
8.1.270.0080.00023.99
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0060.00323.97
8.1.230.0030.00719.07
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0090.00017.35
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0050.00818.25
8.1.160.0000.00719.00
8.1.150.0050.00220.03
8.1.140.0000.00719.64
8.1.130.0070.00018.93
8.1.120.0060.00317.41
8.1.110.0080.00017.37
8.1.100.0040.00417.40
8.1.90.0040.00417.41
8.1.80.0070.00017.52
8.1.70.0030.00317.43
8.1.60.0000.00917.63
8.1.50.0040.00417.42
8.1.40.0030.00617.47
8.1.30.0040.00417.51
8.1.20.0050.00517.59
8.1.10.0030.00517.53
8.1.00.0000.00917.52
8.0.300.0060.00318.77
8.0.290.0000.00716.75
8.0.280.0030.00318.56
8.0.270.0080.00017.45
8.0.260.0030.00719.02
8.0.250.0030.00316.92
8.0.240.0000.00717.02
8.0.230.0030.00317.06
8.0.220.0070.00016.93
8.0.210.0070.00017.03
8.0.200.0000.00717.04
8.0.190.0030.00516.91
8.0.180.0080.00016.95
8.0.170.0050.00317.02
8.0.160.0030.00517.07
8.0.150.0000.00816.86
8.0.140.0030.00316.82
8.0.130.0060.00013.40
8.0.120.0030.00616.98
8.0.110.0000.00716.87
8.0.100.0040.00417.00
8.0.90.0050.00316.84
8.0.80.0040.01016.87
8.0.70.0040.00417.07
8.0.60.0070.00016.94
8.0.50.0000.00716.86
8.0.30.0110.00817.15
8.0.20.0100.01017.40
8.0.10.0000.00717.08
8.0.00.0030.01316.92
7.4.330.0020.00215.55
7.4.320.0060.00016.53
7.4.300.0000.00716.60
7.4.290.0000.00816.63
7.4.280.0000.00716.59
7.4.270.0000.00816.48
7.4.260.0060.00316.63
7.4.250.0070.00016.47
7.4.240.0000.00716.61
7.4.230.0050.00316.41
7.4.220.0120.00916.71
7.4.210.0030.01216.60
7.4.200.0000.00716.60
7.4.160.0080.00916.76
7.4.150.0150.01217.40
7.4.140.0150.00517.86
7.4.130.0160.00916.57
7.4.120.0080.01316.57
7.4.110.0060.01916.64
7.4.100.0190.00316.63
7.4.90.0060.00916.65
7.4.80.0130.01019.39
7.4.70.0060.01116.53
7.4.60.0110.00516.63
7.4.50.0030.01216.66
7.4.40.0080.00816.67
7.4.30.0100.01016.46
7.4.00.0050.01314.92
7.3.330.0000.00513.30
7.3.320.0030.00313.21
7.3.310.0000.00716.42
7.3.300.0000.00716.39
7.3.290.0030.00316.48
7.3.280.0060.01116.41
7.3.270.0060.01217.40
7.3.260.0160.00916.66
7.3.240.0120.00616.55
7.3.230.0120.00616.40
7.3.210.0070.01116.28
7.3.200.0130.00416.55
7.3.190.0120.00616.48
7.3.180.0060.01216.42
7.3.170.0070.01016.41
7.3.160.0030.01316.44
7.3.120.0070.00815.04
7.3.110.0120.00315.02
7.3.100.0130.00315.06
7.3.90.0070.00714.87
7.3.80.0080.00514.87
7.3.70.0070.00514.74
7.3.60.0060.00714.95
7.3.50.0080.00914.73
7.3.40.0020.01014.97
7.3.30.0090.00614.80
7.3.20.0070.01016.79
7.3.10.0060.00816.80
7.3.00.0070.00816.75
7.2.330.0000.01616.71
7.2.320.0090.01416.54
7.2.310.0120.00616.70
7.2.300.0030.01516.77
7.2.290.0110.00916.94
7.2.250.0040.01114.96
7.2.240.0060.01215.34
7.2.230.0050.00815.06
7.2.220.0070.00815.06
7.2.210.0070.00714.88
7.2.200.0050.00715.06
7.2.190.0080.01015.04
7.2.180.0050.01115.22
7.2.170.0050.01215.04
7.2.160.0030.01215.20
7.2.150.0110.00517.03
7.2.140.0090.00316.79
7.2.130.0070.00916.89
7.2.120.0060.00917.04
7.2.110.0040.01116.87
7.2.100.0060.00916.90
7.2.90.0060.00917.04
7.2.80.0050.01016.95
7.2.70.0050.01017.07
7.2.60.0050.00917.03
7.2.50.0020.01116.96
7.2.40.0080.00716.87
7.2.30.0080.00517.16
7.2.20.0060.00816.85
7.2.10.0060.00716.87
7.2.00.0010.01417.49
7.1.330.0080.00715.94
7.1.320.0070.00715.62
7.1.310.0060.00815.71
7.1.300.0070.00615.77
7.1.290.0050.01015.77
7.1.280.0000.01515.85
7.1.270.0010.01115.85
7.1.260.0040.01315.92
7.1.250.0080.00615.73
7.1.240.0000.00815.89
7.1.230.0060.00615.89
7.1.220.0070.01015.63
7.1.210.0030.01015.89
7.1.200.0050.01015.73
7.1.190.0060.00615.86
7.1.180.0030.00915.97
7.1.170.0060.00615.69
7.1.160.0100.00715.84
7.1.150.0050.00315.59
7.1.140.0030.01215.81
7.1.130.0090.00315.51
7.1.120.0030.00915.73
7.1.110.0000.01015.68
7.1.100.0030.01015.81
7.1.90.0030.00615.82
7.1.80.0030.00915.95
7.1.70.0060.00416.38
7.1.60.0050.00716.43
7.1.50.0060.01116.43
7.1.40.0130.01025.05
7.1.30.0170.00525.09
7.1.20.0110.00925.22
7.1.10.0030.01016.17
7.1.00.0090.00316.13
7.0.330.0090.00315.64
7.0.320.0030.01015.34
7.0.310.0100.00315.41
7.0.300.0040.01115.43
7.0.290.0110.00315.43
7.0.280.0060.00615.45
7.0.270.0000.01015.50
7.0.260.0030.00715.43
7.0.250.0030.00915.54
7.0.240.0030.00915.53
7.0.230.0120.00315.65
7.0.220.0080.00415.43
7.0.210.0100.00315.55
7.0.200.0060.00816.16
7.0.190.0080.00315.24
7.0.180.0030.00815.84
7.0.170.0050.00815.77
7.0.160.0050.00915.85
7.0.150.0040.00815.75
7.0.140.0020.01115.87
7.0.130.0080.00515.85
7.0.120.0040.00515.92
7.0.110.0040.00915.83
7.0.100.0020.01015.76
7.0.90.0040.00515.89
7.0.80.0030.00915.81
7.0.70.0050.00615.92
7.0.60.0000.01315.62
7.0.50.0080.00515.95
7.0.40.0040.00914.94
7.0.30.0030.00814.94
7.0.20.0050.00814.91
7.0.10.0000.00914.83
7.0.00.0060.00714.89
5.6.400.0070.00714.45
5.6.390.0120.00314.05
5.6.380.0000.01814.46
5.6.370.0000.00914.42
5.6.360.0120.00614.51
5.6.350.0080.00514.52
5.6.340.0000.01014.54
5.6.330.0030.00714.84
5.6.320.0070.00714.93
5.6.310.0060.00914.68
5.6.300.0100.00614.33
5.6.290.0040.00414.78
5.6.280.0080.00314.24
5.6.270.0060.00614.22
5.6.260.0030.01014.32
5.6.250.0110.00414.46
5.6.240.0040.01214.64
5.6.230.0080.00014.67
5.6.220.0040.00814.16
5.6.210.0100.00314.59
5.6.200.0080.00414.41
5.6.190.0070.00714.29
5.6.180.0070.00614.47
5.6.170.0060.00614.57
5.6.160.0090.00314.67
5.6.150.0040.00714.43
5.6.140.0030.01014.33
5.6.130.0000.00814.22
5.6.120.0060.00914.78
5.6.110.0030.00714.47
5.6.100.0090.00414.71
5.6.90.0030.01014.54
5.6.80.0100.00314.37
5.6.70.0090.00614.35
5.6.60.0110.00314.40
5.6.50.0040.01114.42
5.6.40.0090.00614.26
5.6.30.0040.00714.58
5.6.20.0080.00414.27
5.6.10.0030.00914.33
5.6.00.0060.00314.59

preferences:
49.96 ms | 401 KiB | 5 Q