3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo implements Iterator { public function __construct() { $this->position = 0; } function rewind() { $this->position = 0; } function current() { return $this->array[$this->position]; } function key() { return $this->position; } function next() { ++$this->position; } function valid() { return isset($this->array[$this->position]); } static function bar() { return "brap brap"; } } echo foo::bar(); var_dump (foo instanceOf Iterator);

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.40.0120.00318.75
8.3.30.0140.00019.04
8.3.20.0000.00720.16
8.3.10.0090.00023.53
8.3.00.0050.00517.75
8.2.170.0110.00322.96
8.2.160.0030.01020.50
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00022.25
8.2.110.0100.00022.08
8.2.100.0080.00417.79
8.2.90.0090.00019.13
8.2.80.0080.00017.97
8.2.70.0110.00017.50
8.2.60.0030.00618.04
8.2.50.0060.00318.07
8.2.40.0030.00617.94
8.2.30.0070.00018.14
8.2.20.0050.00217.79
8.2.10.0070.00017.93
8.2.00.0030.00717.62
8.1.270.0050.00323.88
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01023.85
8.1.230.0000.01419.23
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0000.00917.22
8.1.190.0040.00417.53
8.1.180.0030.00919.01
8.1.170.0000.00918.59
8.1.160.0070.00021.88
8.1.150.0000.00718.49
8.1.140.0040.00417.40
8.1.130.0000.00717.72
8.1.120.0000.00817.36
8.1.110.0060.00317.44
8.1.100.0070.00017.43
8.1.90.0030.00517.29
8.1.80.0030.00317.29
8.1.70.0060.00317.39
8.1.60.0000.00717.44
8.1.50.0090.00017.46
8.1.40.0030.00617.44
8.1.30.0000.00817.48
8.1.20.0080.00017.60
8.1.10.0000.00717.40
8.1.00.0080.00017.40
8.0.300.0030.00618.77
8.0.290.0040.00417.05
8.0.280.0000.00718.45
8.0.270.0070.00017.16
8.0.260.0040.00417.19
8.0.250.0030.00316.91
8.0.240.0030.00316.93
8.0.230.0000.00716.88
8.0.220.0040.00416.93
8.0.210.0040.00416.97
8.0.200.0000.00816.95
8.0.190.0040.00417.02
8.0.180.0060.00417.06
8.0.170.0000.00816.96
8.0.160.0060.00317.02
8.0.150.0000.00716.81
8.0.140.0070.00016.87
8.0.130.0000.00613.36
8.0.120.0050.00316.89
8.0.110.0040.00416.99
8.0.100.0000.00816.97
8.0.90.0040.00416.85
8.0.80.0150.00616.84
8.0.70.0050.00317.01
8.0.60.0040.00417.07
8.0.50.0080.00017.00
8.0.30.0110.00817.01
8.0.20.0080.01017.40
8.0.10.0050.00316.95
8.0.00.0080.01016.60
7.4.330.0020.00315.00
7.4.320.0030.00316.44
7.4.300.0000.00616.43
7.4.290.0030.00316.39
7.4.280.0040.00416.43
7.4.270.0030.00316.49
7.4.260.0030.00316.34
7.4.250.0000.00716.39
7.4.240.0040.00416.47
7.4.230.0000.00716.41
7.4.220.0190.00316.30
7.4.210.0080.00916.54
7.4.200.0040.00416.34
7.4.190.0040.00416.45
7.4.160.0030.01216.43
7.4.150.0040.01417.40
7.4.140.0100.00717.86
7.4.130.0090.00816.69
7.4.120.0110.00616.46
7.4.110.0120.00916.50
7.4.100.0120.00916.31
7.4.90.0130.00716.41
7.4.80.0110.01119.39
7.4.70.0090.00916.31
7.4.60.0070.01016.77
7.4.50.0000.00816.32
7.4.40.0060.00822.77
7.4.30.0080.00816.40
7.4.10.0030.01716.48
7.4.00.0100.00615.48
7.3.330.0050.00013.30
7.3.320.0060.00013.10
7.3.310.0000.00716.35
7.3.300.0000.00716.21
7.3.290.0180.00016.38
7.3.280.0120.00716.34
7.3.270.0070.01017.40
7.3.260.0170.00716.22
7.3.250.0160.00516.38
7.3.240.0140.00416.38
7.3.230.0070.01016.51
7.3.210.0110.00616.48
7.3.200.0140.00419.39
7.3.190.0060.01616.41
7.3.180.0090.00616.28
7.3.170.0030.01516.52
7.3.160.0100.01016.45
7.3.130.0100.01016.29
7.3.120.0090.00815.23
7.3.110.0050.00915.63
7.3.100.0100.00615.63
7.3.90.0060.00615.63
7.3.80.0050.01015.58
7.3.70.0090.00515.59
7.3.60.0060.00915.52
7.3.50.0050.00715.57
7.3.40.0060.00815.71
7.3.30.0090.00315.53
7.3.20.0060.00917.24
7.3.10.0050.00917.26
7.3.00.0090.00417.27
7.2.330.0060.01716.48
7.2.320.0070.01616.71
7.2.310.0120.00616.50
7.2.300.0100.00716.66
7.2.290.0130.00316.74
7.2.260.0100.01016.54
7.2.250.0070.01215.69
7.2.240.0100.00815.72
7.2.230.0080.00715.77
7.2.220.0020.00915.59
7.2.210.0030.01115.61
7.2.200.0060.00915.74
7.2.190.0060.00615.57
7.2.180.0020.01215.71
7.2.170.0100.00315.77
7.2.160.0060.01016.57
7.2.150.0040.01118.39
7.2.140.0030.00718.46
7.2.130.0100.00718.36
7.2.120.0040.01418.48
7.2.110.0030.01718.38
7.2.100.0130.00618.22
7.2.90.0110.00418.34
7.2.80.0070.00318.46
7.2.70.0070.00718.31
7.2.60.0000.01317.61
7.2.50.0130.00318.27
7.2.40.0030.01218.40
7.2.30.0050.00518.43
7.2.20.0040.00818.23
7.2.10.0030.01318.46
7.2.00.0030.01318.31
7.1.330.0050.00816.49
7.1.320.0030.00716.53
7.1.310.0010.00916.38
7.1.300.0030.00616.52
7.1.290.0110.00316.55
7.1.280.0050.00416.45
7.1.270.0040.00816.42
7.1.260.0030.00616.37
7.1.250.0030.01317.15
7.1.240.0000.01317.19
7.1.230.0060.01017.21
7.1.220.0060.00617.18
7.1.210.0060.00617.18
7.1.200.0040.00916.42
7.1.190.0090.00317.09
7.1.180.0060.00917.18
7.1.170.0000.01117.38
7.1.160.0060.00617.29
7.1.150.0030.00617.27
7.1.140.0070.00717.29
7.1.130.0030.01317.36
7.1.120.0060.00617.34
7.1.110.0100.00317.16
7.1.100.0140.00417.41
7.1.90.0100.00617.28
7.1.80.0060.00917.38
7.1.70.0060.01217.20
7.1.60.0100.01018.34
7.1.50.0070.01416.85
7.1.40.0120.00317.17
7.1.30.0070.00317.21
7.1.20.0070.00717.39
7.1.10.0110.00417.19
7.1.00.0020.04319.85
7.0.330.0030.01016.91
7.0.320.0030.00816.89
7.0.310.0070.01016.88
7.0.300.0070.00716.78
7.0.290.0110.00316.98
7.0.280.0000.00916.96
7.0.270.0060.00516.89
7.0.260.0060.00616.96
7.0.250.0090.00316.87
7.0.240.0070.01017.04
7.0.230.0030.01317.04
7.0.220.0030.01017.00
7.0.210.0060.00316.95
7.0.200.0030.01016.92
7.0.190.0070.00716.95
7.0.180.0060.00916.89
7.0.170.0000.01416.86
7.0.160.0060.00916.95
7.0.150.0070.00317.14
7.0.140.0090.03519.44
7.0.130.0040.00416.92
7.0.120.0090.00616.97
7.0.110.0030.00616.99
7.0.100.0060.00916.97
7.0.90.0040.01116.83
7.0.80.0030.00616.95
7.0.70.0020.04719.36
7.0.60.0100.04219.35
7.0.50.0090.04119.59
7.0.40.0070.03817.50
7.0.30.0000.05017.52
7.0.20.0060.04317.48
7.0.10.0000.04717.53
7.0.00.0010.04517.53
5.6.400.0070.00715.65
5.6.390.0070.00715.84
5.6.380.0060.00715.64
5.6.370.0030.00715.79
5.6.360.0000.01616.08
5.6.350.0060.00915.88
5.6.340.0000.01015.71
5.6.330.0000.01315.98
5.6.320.0070.00716.08
5.6.310.0070.01015.85
5.6.300.0060.00916.02
5.6.290.0040.00815.93
5.6.280.0050.04218.49
5.6.270.0060.00915.82
5.6.260.0120.00615.89
5.6.250.0030.01315.94
5.6.240.0060.00915.68
5.6.230.0030.01015.66
5.6.220.0070.04218.25
5.6.210.0020.02718.34
5.6.200.0110.04118.38
5.6.190.0060.02718.41
5.6.180.0030.04518.42
5.6.170.0090.02218.29
5.6.160.0090.04318.35
5.6.150.0030.04618.34
5.6.140.0100.02618.47
5.6.130.0110.02218.40
5.6.120.0080.03918.33
5.6.110.0110.04618.44
5.6.100.0090.04118.53
5.6.90.0090.04418.41
5.6.80.0050.04517.98
5.6.70.0070.03517.94
5.6.60.0030.04518.02
5.6.50.0060.04118.22
5.6.40.0060.03818.04
5.6.30.0030.04518.09
5.6.20.0020.03818.01
5.6.10.0050.04518.14
5.6.00.0050.03918.03
5.5.380.0000.01115.60
5.5.370.0000.01715.73
5.5.360.0070.05218.21
5.5.350.0050.04517.95
5.5.340.0030.04618.26
5.5.330.0000.03818.26
5.5.320.0030.03518.31
5.5.310.0040.03318.36
5.5.300.0020.04018.29
5.5.290.0050.04018.24
5.5.280.0150.03518.23
5.5.270.0070.04718.20
5.5.260.0040.04518.22
5.5.250.0070.04518.12
5.5.240.0020.04717.99
5.5.230.0030.03817.92
5.5.220.0020.04517.94
5.5.210.0030.04417.95
5.5.200.0050.03817.96
5.5.190.0020.03717.83
5.5.180.0050.04217.96
5.5.170.0050.00515.72
5.5.160.0050.03717.93
5.5.150.0070.02017.97
5.5.140.0080.02617.88
5.5.130.0060.04217.82
5.5.120.0020.04317.97
5.5.110.0050.03917.83
5.5.100.0050.03417.87
5.5.90.0030.03317.86
5.5.80.0090.03517.90
5.5.70.0030.03517.80
5.5.60.0050.04217.79
5.5.50.0070.04017.88
5.5.40.0040.03217.74
5.5.30.0060.02817.90
5.5.20.0090.02317.74
5.5.10.0060.04117.66
5.5.00.0030.04817.81
5.4.450.0050.02516.00
5.4.440.0000.03415.97
5.4.430.0050.03016.10
5.4.420.0030.04716.05
5.4.410.0030.04016.06
5.4.400.0080.03315.81
5.4.390.0030.03215.77
5.4.380.0030.04315.80
5.4.370.0050.03815.74
5.4.360.0030.04615.75
5.4.350.0000.02915.75
5.4.340.0070.03715.83
5.4.330.0000.01212.63
5.4.320.0080.03715.84
5.4.310.0060.02815.75
5.4.300.0040.04215.90
5.4.290.0050.04015.75
5.4.280.0070.03815.79
5.4.270.0070.03715.84
5.4.260.0020.04115.79
5.4.250.0030.04115.74
5.4.240.0020.02515.88
5.4.230.0080.03615.79
5.4.220.0050.03615.82
5.4.210.0030.04015.77
5.4.200.0050.03415.74
5.4.190.0050.02715.77
5.4.180.0040.03915.81
5.4.170.0020.03615.82
5.4.160.0070.03515.73
5.4.150.0060.03115.78
5.4.140.0030.02814.43
5.4.130.0100.02714.40
5.4.120.0080.03014.37
5.4.110.0050.03514.35
5.4.100.0050.03214.48
5.4.90.0090.03314.46
5.4.80.0080.03614.39
5.4.70.0090.02514.49
5.4.60.0020.02714.41
5.4.50.0020.02514.50
5.4.40.0050.03714.45
5.4.30.0000.03714.42
5.4.20.0040.03814.44
5.4.10.0050.03714.51
5.4.00.0020.03714.17
5.3.290.0060.02613.80
5.3.280.0030.04013.83
5.3.270.0040.03513.82
5.3.260.0080.04113.83
5.3.250.0090.03513.77
5.3.240.0040.02413.72
5.3.230.0090.03013.80
5.3.220.0020.03813.75
5.3.210.0060.03313.76
5.3.200.0050.03313.77
5.3.190.0040.02013.81
5.3.180.0050.04213.80
5.3.170.0040.04113.85
5.3.160.0040.03213.77
5.3.150.0020.04013.81
5.3.140.0020.04213.83
5.3.130.0030.04013.83
5.3.120.0030.03013.83
5.3.110.0030.04213.84
5.3.100.0020.04113.54
5.3.90.0000.03813.46
5.3.80.0050.03313.34
5.3.70.0040.03913.41
5.3.60.0070.03713.52
5.3.50.0010.04013.42
5.3.40.0080.03513.49
5.3.30.0040.03813.43
5.3.20.0000.02913.32
5.3.10.0030.02813.21
5.3.00.0030.04013.17
5.2.170.0030.05011.27
5.2.160.0000.06011.24
5.2.150.0070.05711.25
5.2.140.0000.06711.24
5.2.130.0100.05011.24
5.2.120.0030.05711.24
5.2.110.0000.04311.24
5.2.100.0000.03711.24
5.2.90.0000.04011.24
5.2.80.0000.06011.24
5.2.70.0030.04011.24
5.2.60.0000.06311.24
5.2.50.0070.05311.24
5.2.40.0000.06011.24
5.2.30.0030.05311.24
5.2.20.0000.06311.24
5.2.10.0100.04311.24
5.2.00.0000.06011.24
5.1.60.0000.04311.24
5.1.50.0000.05011.24
5.1.40.0070.03311.24
5.1.30.0000.06011.24
5.1.20.0030.04011.24
5.1.10.0070.04711.24
5.1.00.0070.05011.24
5.0.50.0000.05011.24
5.0.40.0070.04311.24
5.0.30.0030.06011.24
5.0.20.0000.04711.24
5.0.10.0030.03311.24
5.0.00.0030.06011.24
4.4.90.0000.03311.24
4.4.80.0000.03711.24
4.4.70.0000.03311.24
4.4.60.0000.03011.24
4.4.50.0000.02011.24
4.4.40.0000.03311.24
4.4.30.0000.02711.24
4.4.20.0000.03011.24
4.4.10.0000.03711.24
4.4.00.0070.04011.24
4.3.110.0030.03011.24
4.3.100.0000.03711.24
4.3.90.0000.03011.24
4.3.80.0000.05711.24
4.3.70.0000.02711.24
4.3.60.0000.03311.24
4.3.50.0030.03711.24
4.3.40.0000.05311.24
4.3.30.0070.03311.24
4.3.20.0000.04011.24
4.3.10.0000.02711.24
4.3.00.0000.03011.24

preferences:
37.57 ms | 400 KiB | 5 Q