3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C implements ArrayAccess { public $data = array( "foo"=>"bar" ); public function offsetExists ( $offset ): bool{ return array_key_exists((string)$offset,$this->data); } public function offsetGet ( $offset ){ return $this->data[$offset]; } public function offsetSet ( $offset , $value ): void { $this->data[$offset]=$value; } public function offsetUnset ( $offset ): void { unset($this->data[$offset]); } } $o=new C(); if(array_key_exists('foo',$o)){ echo "ArrayAccess seems to work"; }else{ echo "ArrayAccess seems broken"; }
based on TcNR4

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.0.0beta30.0100.01016.67
8.0.0beta20.0110.01116.49
8.0.0beta10.0140.00816.59
8.0.0alpha30.0140.00816.60
8.0.0alpha20.0100.01116.47
8.0.0alpha10.0110.01116.49
7.4.100.0110.01016.36
7.4.90.0120.00816.36
7.4.80.0100.01016.33
7.4.70.0130.01016.40
7.4.60.0130.00916.39
7.4.50.0130.01016.42
7.4.40.0110.01016.36
7.4.30.0130.00816.41
7.4.20.0110.00916.45
7.4.10.0130.00716.38
7.4.00.0100.00816.47
7.3.220.0110.00916.18
7.3.210.0100.01116.28
7.3.200.0110.00916.19
7.3.190.0130.01016.26
7.3.180.0110.01116.28
7.3.170.0100.01116.29
7.3.160.0110.00916.27
7.3.150.0110.00916.23
7.3.140.0110.00916.30
7.3.130.0120.00816.27
7.3.120.0110.00916.22
7.3.110.0110.00816.22
7.3.100.0090.01016.21
7.3.90.0110.00816.20
7.3.80.0130.00716.23
7.3.70.0100.01016.18
7.3.60.0090.01016.20
7.3.50.0100.01016.19
7.3.40.0120.00716.16
7.3.30.0120.00816.20
7.3.20.0130.00816.36
7.3.10.0110.00816.35
7.3.00.0130.00816.20
7.2.330.0110.01016.50
7.2.320.0120.01016.48
7.2.310.0130.01016.52
7.2.300.0120.00916.44
7.2.290.0110.01116.48
7.2.280.0120.00916.38
7.2.270.0110.01016.54
7.2.260.0100.01016.52
7.2.250.0110.01016.46
7.2.240.0100.01016.44
7.2.230.0110.01016.49
7.2.220.0110.01016.50
7.2.210.0120.00816.47
7.2.200.0110.01116.40
7.2.190.0090.01116.39
7.2.180.0110.00816.41
7.2.170.0130.00816.40
7.2.160.0110.01016.46
7.2.150.0140.00816.58
7.2.140.0140.00916.58
7.2.130.0110.01116.61
7.2.120.0110.01016.46
7.2.110.0140.01016.63
7.2.100.0120.00916.64
7.2.90.0100.01016.61
7.2.80.0130.00916.45
7.2.70.0140.01116.58
7.2.60.0160.00816.61
7.2.50.0110.01116.66
7.2.40.0130.00916.64
7.2.30.0110.01116.67
7.2.20.0150.00916.66
7.2.10.0120.01016.63
7.2.00.0120.00916.59
7.1.330.0190.01315.44
7.1.320.0410.00315.59
7.1.310.0160.01715.64
7.1.300.0230.00715.67
7.1.290.0190.01115.60
7.1.280.0220.01115.55
7.1.270.0070.02315.63
7.1.260.0190.01015.47
7.1.250.0220.00715.59
7.1.240.0240.00715.49
7.1.230.0230.00915.50
7.1.220.0260.00515.47
7.1.210.0220.00915.55
7.1.200.0270.00315.43
7.1.190.0250.00715.37
7.1.180.0220.01215.45
7.1.170.0260.01015.52
7.1.160.0220.00815.48
7.1.150.0210.01115.33
7.1.140.0270.00715.55
7.1.130.0230.00615.46
7.1.120.0300.00415.52
7.1.110.0260.01215.49
7.1.100.0310.00615.48
7.1.90.0080.02315.52
7.1.80.0280.00415.46
7.1.70.0200.01515.64
7.1.60.0250.01215.37
7.1.50.0220.00615.52
7.1.40.0240.01115.63
7.1.30.0230.01415.53
7.1.20.0260.00515.47
7.1.10.0220.00715.50
7.1.00.0230.00915.45
7.0.330.0180.01115.25
7.0.320.0230.00815.25
7.0.310.0160.01715.14
7.0.300.0100.01315.30
7.0.290.0100.01315.28
7.0.280.0160.01114.83
7.0.270.0130.01115.11
7.0.260.0200.01015.15
7.0.250.0160.01415.09
7.0.240.0510.01214.92
7.0.230.0160.01215.13
7.0.220.0150.00915.05
7.0.210.0180.00815.00
7.0.200.0170.01215.05
7.0.190.0200.00814.96
7.0.180.0260.00315.02
7.0.170.0190.00914.80
7.0.160.0180.00714.79
7.0.150.0190.00815.05
7.0.140.0260.00315.21
7.0.130.0250.00614.97
7.0.120.0390.00815.24
7.0.110.0280.00315.22
7.0.100.0260.00814.99
7.0.90.0320.00015.16
7.0.80.0230.00815.16
7.0.70.0240.00315.06
7.0.60.0170.01415.22
7.0.50.0180.01515.02
7.0.40.0180.01215.09
7.0.30.0220.00415.20
7.0.20.0140.00915.30
7.0.10.0190.01115.17
7.0.00.0260.00315.27
5.6.400.0080.02015.52
5.6.390.0250.01115.50
5.6.380.0210.01415.92
5.6.370.0040.01915.86
5.6.360.0090.01815.66
5.6.350.0250.00515.64
5.6.340.0140.00815.38
5.6.330.0180.01815.76
5.6.320.0090.01515.77
5.6.310.0220.00915.43
5.6.300.0240.00715.66
5.6.290.0160.01215.69
5.6.280.0240.00815.87
5.6.270.0150.01615.55
5.6.260.0280.00815.75
5.6.250.0210.01515.70
5.6.240.0240.01215.70
5.6.230.0150.01815.70
5.6.220.0140.01815.64
5.6.210.0260.01015.58
5.6.200.0240.01415.56
5.6.190.0200.01015.86
5.6.180.0190.01315.72
5.6.170.0280.00615.54
5.6.160.0120.02015.70
5.6.150.0130.01615.89
5.6.140.0220.01015.49
5.6.130.0120.01215.67
5.6.120.0160.00815.63
5.6.110.0140.01015.53
5.6.100.0170.00815.70
5.6.90.0170.01015.76
5.6.80.0060.01615.48
5.6.70.0150.00615.71
5.6.60.0150.00615.70
5.6.50.0110.00815.39
5.6.40.0130.01015.59
5.6.30.0170.01015.60
5.6.20.0170.01315.78
5.6.10.0090.01615.40
5.6.00.0170.00915.56
5.5.380.0270.00515.52
5.5.370.0190.01615.90
5.5.360.0190.01615.45
5.5.350.0190.01415.43
5.5.340.0250.00815.54
5.5.330.0200.01015.66
5.5.320.0260.00915.77
5.5.310.0170.01415.64
5.5.300.0290.00615.82
5.5.290.0300.00315.75
5.5.280.0170.01715.84
5.5.270.0180.01515.65
5.5.260.0210.01015.48
5.5.250.0260.01115.44
5.5.240.0310.00415.45
5.5.230.0240.00715.39
5.5.220.0170.01415.49
5.5.210.0160.01315.60
5.5.200.0230.00915.65
5.5.190.0200.01615.46
5.5.180.0210.01915.58
5.5.170.0310.00615.35
5.5.160.0200.01615.56
5.5.150.0170.02315.52
5.5.140.0250.01215.82
5.5.130.0310.00715.55
5.5.120.0210.01615.61
5.5.110.0260.01115.36
5.5.100.0240.01115.54
5.5.90.0220.01515.61
5.5.80.0200.01815.47
5.5.70.0270.01215.65
5.5.60.0130.02215.23
5.5.50.0220.01215.55
5.5.40.0220.00915.22
5.5.30.0250.00715.48
5.5.20.0210.01015.62
5.5.10.0130.02215.31
5.5.00.0160.01615.35
5.4.450.0160.00712.34
5.4.440.0210.00312.53
5.4.430.0160.00812.54
5.4.420.0140.01012.32
5.4.410.0170.01112.50
5.4.400.0190.00812.29
5.4.390.0190.00612.58
5.4.380.0170.00712.57
5.4.370.0160.00812.56
5.4.360.0180.00612.32
5.4.350.0300.00012.20
5.4.340.0180.01112.32
5.4.330.0210.00912.37
5.4.320.0180.00912.42
5.4.310.0220.00612.39
5.4.300.0110.01112.39
5.4.290.0200.00912.35
5.4.280.0200.00612.44
5.4.270.0150.01312.51
5.4.260.0220.00612.60
5.4.250.0170.01312.56
5.4.240.0130.01412.29
5.4.230.0170.01212.27
5.4.220.0190.00812.21
5.4.210.0220.00612.37
5.4.200.0140.01012.41
5.4.190.0110.01512.52
5.4.180.0200.00912.47
5.4.170.0230.00912.17
5.4.160.0190.00612.34
5.4.150.0130.01012.29
5.4.140.0140.01112.34
5.4.130.0090.01512.54
5.4.120.0190.00512.45
5.4.110.0190.00612.42
5.4.100.0240.00312.72
5.4.90.0160.00812.54
5.4.80.0130.00912.39
5.4.70.0170.00812.60
5.4.60.0170.00712.51
5.4.50.0160.00812.40
5.4.40.0130.01312.42
5.4.30.0140.01412.42
5.4.20.0140.01112.48
5.4.10.0170.01112.55
5.4.00.0160.01312.42
5.3.290.0100.01912.78
5.3.280.0200.00812.78
5.3.270.0220.00612.84
5.3.260.0150.01212.88
5.3.250.0180.00612.74
5.3.240.0190.00612.58
5.3.230.0200.00712.81
5.3.220.0160.00912.66
5.3.210.0170.00912.67
5.3.200.0180.01112.77
5.3.190.0180.00612.85
5.3.180.0230.00312.97
5.3.170.0200.00712.84
5.3.160.0200.00612.91
5.3.150.0150.00912.84
5.3.140.0210.00712.77
5.3.130.0200.00612.80
5.3.120.0220.00612.79
5.3.110.0180.00612.91
5.3.100.0150.01512.78
5.3.90.0220.00412.88
5.3.80.0170.00812.71
5.3.70.0160.00512.84
5.3.60.0130.01012.76
5.3.50.0090.01412.88
5.3.40.0130.01112.82
5.3.30.0180.00612.75
5.3.20.0190.00312.68
5.3.10.0210.00512.48
5.3.00.0160.01012.62
5.2.170.0160.00711.84
5.2.160.0170.00611.76
5.2.150.0120.01111.84
5.2.140.0160.00411.79
5.2.130.0130.00611.85
5.2.120.0070.01711.70
5.2.110.0180.00611.85
5.2.100.0140.00711.74
5.2.90.0170.00611.86
5.2.80.0120.00911.95
5.2.70.0110.00811.79
5.2.60.0130.00711.66
5.2.50.0040.01611.75
5.2.40.0210.00011.70
5.2.30.0100.01011.77
5.2.20.0090.01211.63
5.2.10.0150.00411.47
5.2.00.0090.00911.52
5.1.60.0190.00310.71
5.1.50.0130.00610.78
5.1.40.0140.00810.92
5.1.30.0130.00710.97
5.1.20.0120.00910.96
5.1.10.0110.00910.99
5.1.00.0180.00010.70
5.0.50.0070.00710.68
5.0.40.0090.00610.68
5.0.30.0140.00010.68
5.0.20.0110.00410.68
5.0.10.0090.00610.68
5.0.00.0070.00810.68
4.4.90.0050.00510.68
4.4.80.0070.00310.68
4.4.70.0060.00310.68
4.4.60.0100.00010.68
4.4.50.0110.00010.68
4.4.40.0050.00710.68
4.4.30.0100.00010.68
4.4.20.0060.00610.68
4.4.10.0070.00210.68
4.4.00.0090.00010.68
4.3.110.0050.00510.68
4.3.100.0080.00310.68
4.3.90.0100.00010.68
4.3.80.0100.00010.68
4.3.70.0070.00210.68
4.3.60.0060.00610.68
4.3.50.0110.00010.68
4.3.40.0070.00410.68
4.3.30.0060.00310.68
4.3.20.0070.00210.68
4.3.10.0040.00410.68
4.3.00.0080.00010.68