3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ProfsimmException extends Exception { } class Foo implements ArrayAccess { public function offsetExists ( $offset ) { return array_key_exists($this->foo[$offset]); } public function offsetGet ( $offset ) { return $this->foo[$offset]; } public function offsetSet ( $offset, $value ) { $this->foo[$offset] = $value; } public function offsetUnset ( $offset ) { unset($this->foo[$offset]); } } class Bar { private $foo; public function __construct() { $this->foo = new Foo(); } public function __set($prop, $value) { $this->$prop = $value; } public function __get($prop) { if ($this->$prop instanceof \ArrayAccess) { throw new ProfsimmException("Nope."); } } } $bar = new Bar(); $bar->foo['abc'] = 'def'; var_dump($bar); $foo = $bar->foo;

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.00318.43
8.3.50.0070.00718.04
8.3.40.0130.00718.93
8.3.30.0040.01118.77
8.3.20.0050.00320.20
8.3.10.0000.00821.08
8.3.00.0080.00019.14
8.2.180.0090.00617.00
8.2.170.0120.00322.96
8.2.160.0070.01021.20
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00419.83
8.2.120.0070.00026.35
8.2.110.0000.01122.25
8.2.100.0090.00317.72
8.2.90.0050.00319.05
8.2.80.0000.00918.04
8.2.70.0030.00717.50
8.2.60.0080.00017.80
8.2.50.0040.00418.10
8.2.40.0000.00822.36
8.2.30.0050.00319.16
8.2.20.0030.00518.18
8.2.10.0080.00018.13
8.2.00.0000.00717.95
8.1.280.0130.01025.92
8.1.270.0000.00822.03
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00924.01
8.1.230.0050.00522.13
8.1.220.0040.00417.78
8.1.210.0030.00618.77
8.1.200.0060.00317.11
8.1.190.0000.00817.25
8.1.180.0060.00318.10
8.1.170.0000.00818.74
8.1.160.0040.00419.04
8.1.150.0040.00418.78
8.1.140.0000.00719.45
8.1.130.0030.00318.95
8.1.120.0030.00317.52
8.1.110.0060.00317.48
8.1.100.0040.00417.36
8.1.90.0020.00517.47
8.1.80.0040.00417.49
8.1.70.0030.00617.47
8.1.60.0000.00817.66
8.1.50.0000.00817.42
8.1.40.0080.00017.45
8.1.30.0040.00417.65
8.1.20.0070.00317.63
8.1.10.0040.00417.66
8.1.00.0000.00817.45
8.0.300.0060.00318.77
8.0.290.0000.00716.75
8.0.280.0030.00318.46
8.0.270.0000.00717.27
8.0.260.0030.00318.84
8.0.250.0070.00017.01
8.0.240.0000.00817.03
8.0.230.0000.00817.09
8.0.220.0070.00016.97
8.0.210.0000.00816.94
8.0.200.0000.00616.98
8.0.190.0050.00317.04
8.0.180.0040.00417.01
8.0.170.0070.00016.90
8.0.160.0060.00317.04
8.0.150.0030.00516.85
8.0.140.0040.00416.93
8.0.130.0000.00613.35
8.0.120.0000.00716.88
8.0.110.0050.00217.01
8.0.100.0000.00716.97
8.0.90.0050.00316.82
8.0.80.0060.01217.00
8.0.70.0030.00516.95
8.0.60.0050.00316.80
8.0.50.0050.00217.03
8.0.30.0110.00617.04
8.0.20.0110.00817.40
8.0.10.0050.00216.96
8.0.00.0150.00316.59
7.4.330.0000.00515.55
7.4.320.0000.00616.38
7.4.300.0030.00316.37
7.4.290.0000.00716.60
7.4.280.0000.00816.61
7.4.270.0040.00416.61
7.4.260.0030.00316.50
7.4.250.0040.00416.58
7.4.240.0000.00816.54
7.4.230.0040.00416.52
7.4.220.0030.01716.56
7.4.210.0070.00716.58
7.4.200.0000.00716.50
7.4.160.0120.00416.50
7.4.150.0160.00317.40
7.4.140.0120.00917.86
7.4.130.0150.00616.62
7.4.120.0090.00816.58
7.4.110.0130.00616.60
7.4.100.0190.00316.58
7.4.90.0030.01416.47
7.4.80.0070.01019.39
7.4.70.0080.00816.61
7.4.60.0090.00816.57
7.4.50.0000.01016.41
7.4.40.0110.00616.55
7.4.30.0100.00616.68
7.4.00.0050.01115.00
7.3.330.0030.00613.32
7.3.320.0030.00313.27
7.3.310.0030.00316.45
7.3.300.0070.00016.41
7.3.290.0030.00316.46
7.3.280.0070.01216.46
7.3.270.0130.00917.40
7.3.260.0090.01116.66
7.3.250.0120.01016.60
7.3.240.0090.00816.44
7.3.230.0070.01716.52
7.3.210.0070.01016.52
7.3.200.0100.01316.59
7.3.190.0090.00816.45
7.3.180.0160.00316.66
7.3.170.0060.01516.68
7.3.160.0090.00616.38
7.3.120.0080.01115.05
7.3.110.0070.01214.90
7.3.100.0070.00714.83
7.3.90.0070.00714.80
7.3.80.0020.01014.88
7.3.70.0070.00914.76
7.3.60.0040.00614.96
7.3.50.0050.00714.81
7.3.40.0070.00714.66
7.3.30.0040.00914.79
7.3.20.0090.00516.53
7.3.10.0080.00816.81
7.3.00.0010.01016.45
7.2.330.0090.00916.92
7.2.320.0060.01216.81
7.2.310.0000.01716.44
7.2.300.0110.00616.65
7.2.290.0110.00516.66
7.2.250.0070.01414.91
7.2.240.0050.01415.21
7.2.230.0080.00815.05
7.2.220.0040.00915.09
7.2.210.0060.00915.09
7.2.200.0060.00615.11
7.2.190.0010.01114.92
7.2.180.0110.00514.89
7.2.170.0060.00815.09
7.2.60.0040.00417.08
7.1.330.0070.00615.62
7.1.320.0030.00815.78
7.1.310.0050.01115.95
7.1.300.0050.00415.77
7.1.290.0070.00715.76
7.1.280.0090.00515.58
7.1.270.0050.00915.61
7.1.260.0060.00715.69
7.1.200.0120.00015.68
7.1.70.0100.00717.20
7.1.60.0220.01334.83
7.1.50.0250.00934.69
7.1.40.0180.01534.39
7.1.30.0250.02234.34
7.1.20.0180.01534.40
7.1.10.0100.00716.47
7.1.00.0130.00316.87
7.0.200.0060.00916.59
7.0.190.0090.00616.70
7.0.180.0100.00716.07
7.0.170.0070.01016.24
7.0.160.0080.00816.37
7.0.150.0100.00616.33
7.0.140.0060.01216.41
7.0.130.0100.01016.77
7.0.120.0120.01016.62
7.0.110.0120.01016.40
7.0.100.0090.01116.27
7.0.90.0020.01416.30
7.0.80.0100.01016.37
7.0.70.0070.01116.42
7.0.60.0040.01816.21
7.0.50.0100.01016.43
7.0.40.0100.00616.32
7.0.30.0100.01116.32
7.0.20.0080.00816.56
7.0.10.0070.01016.44
7.0.00.0030.01316.61

preferences:
31.99 ms | 400 KiB | 5 Q