3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = ' /** * * @param string $script The PHP script * @param string $class The full qualified class name with namespace * @param string $alias An optional alias for the class */ protected function addUseStatement(&$script, $class, $alias = null) { if (isset($this->getTable()->useStatements) && in_array($class, $this->getTable()->useStatements)) { return; } if ($alias) { $script = "use $class as $alias;\n$script"; } else { $script = "use $class;\n$script"; } if (!isset($this->getTable()->useStatements)) { $this->getTable()->useStatements = array(); } $this->getTable()->useStatements[] = $class; } '; print_r(token_get_all("<?php\n$code"));

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.0180.00018.43
8.3.50.0080.01021.99
8.3.40.0120.00318.79
8.3.30.0110.00418.67
8.3.20.0000.00818.78
8.3.10.0030.00521.09
8.3.00.0070.00021.79
8.2.180.0100.00716.50
8.2.170.0120.00322.96
8.2.160.0070.00720.41
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00021.05
8.2.110.0070.00420.38
8.2.100.0090.00317.91
8.2.90.0040.00419.27
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00817.91
8.2.50.0000.00818.07
8.2.40.0050.00418.28
8.2.30.0040.00419.47
8.2.20.0030.00517.57
8.2.10.0080.00017.72
8.2.00.0060.00317.68
8.1.280.0230.00525.92
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00422.11
8.1.230.0060.00617.45
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0000.00919.07
8.1.180.0050.00318.10
8.1.170.0030.00618.73
8.1.160.0050.00318.76
8.1.150.0000.00818.63
8.1.140.0000.00717.49
8.1.130.0000.00717.88
8.1.120.0030.00417.45
8.1.110.0040.00417.43
8.1.100.0040.00417.38
8.1.90.0040.00417.48
8.1.80.0080.00017.34
8.1.70.0040.00417.34
8.1.60.0030.00617.62
8.1.50.0050.00317.37
8.1.40.0040.00417.53
8.1.30.0040.00417.57
8.1.20.0030.00617.69
8.1.10.0040.00417.54
8.1.00.0040.00417.48
8.0.300.0030.00518.77
8.0.290.0000.00716.88
8.0.280.0030.00318.54
8.0.270.0070.00017.19
8.0.260.0030.00316.79
8.0.250.0040.00416.89
8.0.240.0000.00817.00
8.0.230.0040.00417.05
8.0.220.0030.00616.93
8.0.210.0090.00016.90
8.0.200.0030.00316.87
8.0.190.0000.00817.03
8.0.180.0050.00216.88
8.0.170.0030.00316.96
8.0.160.0000.00716.94
8.0.150.0030.00316.73
8.0.140.0080.00016.95
8.0.130.0030.00313.34
8.0.120.0000.00716.80
8.0.110.0000.00816.74
8.0.100.0000.00716.80
8.0.90.0040.00416.95
8.0.80.0040.01816.81
8.0.70.0080.00016.73
8.0.60.0020.00516.89
8.0.50.0070.00016.87
8.0.30.0100.00917.05
8.0.20.0080.01017.40
8.0.10.0040.00417.07
8.0.00.0120.00616.69
7.4.330.0020.00216.77
7.4.320.0050.00216.62
7.4.300.0060.00016.49
7.4.290.0030.00316.53
7.4.280.0080.00016.57
7.4.270.0000.00716.39
7.4.260.0050.00013.27
7.4.250.0080.00016.47
7.4.240.0070.00016.48
7.4.230.0000.00716.34
7.4.220.0090.00616.47
7.4.210.0070.00916.61
7.4.200.0000.00816.68
7.4.190.0040.00416.46
7.4.160.0070.01016.64
7.4.150.0070.01017.40
7.4.140.0110.01117.86
7.4.130.0080.01416.48
7.4.120.0060.01316.47
7.4.110.0070.01116.54
7.4.100.0080.01116.49
7.4.90.0130.01016.52
7.4.80.0090.01219.39
7.4.70.0100.00616.55
7.4.60.0100.00716.36
7.4.50.0080.00016.36
7.4.40.0000.01222.77
7.4.30.0100.00616.43
7.4.00.0030.01315.06
7.3.330.0050.00013.18
7.3.320.0060.00013.23
7.3.310.0070.00016.11
7.3.300.0040.00416.26
7.3.290.0090.00616.24
7.3.280.0110.00416.21
7.3.270.0120.00617.40
7.3.260.0100.00818.24
7.3.250.0120.00916.37
7.3.240.0140.00316.50
7.3.230.0070.01016.48
7.3.210.0060.01116.44
7.3.200.0060.01519.39
7.3.190.0030.01516.61
7.3.180.0170.00016.61
7.3.170.0060.00916.47
7.3.160.0070.01016.32
7.3.120.0000.01414.85
7.2.330.0100.00716.46
7.2.320.0170.00316.61
7.2.310.0090.00916.38
7.2.300.0070.01016.59
7.2.290.0030.01316.77
7.2.60.0110.00416.83
7.2.00.0000.01219.43
7.1.200.0050.00315.67
7.1.100.0040.01118.04
7.1.70.0060.00317.04
7.1.60.0110.01519.40
7.1.50.0170.00716.97
7.1.00.0100.05022.57
7.0.200.0080.00416.67
7.0.140.0100.07021.95
7.0.70.0170.07721.63
7.0.60.0170.04321.72
7.0.50.0070.08322.09
7.0.40.0100.08019.95
7.0.30.0130.07319.96
7.0.20.0170.06720.15
7.0.10.0100.08020.14
7.0.00.0100.10720.12
5.6.280.0070.08021.12
5.6.220.0100.06020.56
5.6.210.0100.08320.72
5.6.200.0100.06721.17
5.6.190.0070.08321.11
5.6.180.0030.09321.14
5.6.170.0100.08321.06
5.6.160.0100.08321.11
5.6.150.0230.07321.09
5.6.140.0130.09021.20
5.6.130.0030.08020.98
5.6.120.0170.08321.14
5.6.110.0130.08021.08
5.6.100.0070.04721.09
5.6.90.0070.04321.06
5.6.80.0070.03720.52
5.6.70.0030.04020.43
5.6.60.0030.03320.54
5.6.50.0000.04020.59
5.6.40.0000.09020.46
5.6.30.0100.06720.44
5.6.20.0070.06320.43
5.6.10.0070.04020.40
5.6.00.0100.05720.38
5.5.360.0070.08020.33
5.5.350.0070.08020.46
5.5.340.0200.07320.92
5.5.330.0130.08320.93
5.5.320.0130.05020.86
5.5.310.0030.08720.80
5.5.300.0070.07320.86
5.5.290.0130.07720.76
5.5.280.0130.07720.82
5.5.270.0100.08720.89
5.5.260.0030.04720.89
5.5.250.0030.04320.62
5.5.240.0130.03320.30
5.5.230.0030.03320.29
5.5.220.0070.03020.29
5.5.210.0100.02720.24
5.5.200.0070.04720.30
5.5.190.0070.04720.16
5.5.180.0130.05320.15
5.5.160.0000.05020.16
5.5.150.0070.03720.27
5.5.140.0030.03320.14
5.5.130.0000.03720.31
5.5.120.0030.04320.20
5.5.110.0000.04320.28
5.5.100.0100.02720.11
5.5.90.0000.04320.18
5.5.80.0070.03020.12
5.5.70.0000.03720.13
5.5.60.0070.03020.19
5.5.50.0030.03320.19
5.5.40.0030.03320.06
5.5.30.0100.02720.17
5.5.20.0070.03020.17
5.5.10.0030.03019.98
5.5.00.0100.02720.08
5.4.450.0100.08319.51
5.4.440.0130.07319.17
5.4.430.0100.04019.44
5.4.420.0030.04019.36
5.4.410.0100.03319.07
5.4.400.0000.04318.90
5.4.390.0070.03719.14
5.4.380.0030.03319.08
5.4.370.0030.03719.20
5.4.360.0130.06019.21
5.4.350.0070.06719.07
5.4.340.0100.04318.88
5.4.320.0100.04019.12
5.4.310.0070.04719.09
5.4.300.0070.02719.14
5.4.290.0030.04018.85
5.4.280.0000.06018.90
5.4.270.0030.03719.03
5.4.260.0070.03018.87
5.4.250.0000.04019.20
5.4.240.0070.04718.93
5.4.230.0070.04018.87
5.4.220.0070.03719.04
5.4.210.0100.03319.20
5.4.200.0030.03019.04
5.4.190.0030.03019.20
5.4.180.0100.02719.19
5.4.170.0000.04018.94
5.4.160.0030.03319.00
5.4.150.0000.03319.20
5.4.140.0030.03016.46
5.4.130.0130.02016.42
5.4.120.0030.03316.45
5.4.110.0030.04016.48
5.4.100.0030.03316.40
5.4.90.0000.03316.56
5.4.80.0100.03716.42
5.4.70.0030.05016.38
5.4.60.0030.07016.42
5.4.50.0070.08016.41
5.4.40.0100.05316.52
5.4.30.0100.07316.41
5.4.20.0070.06316.34
5.4.10.0070.07716.38
5.4.00.0130.06315.91
5.3.290.0100.04314.70
5.3.280.0030.03014.66
5.3.270.0030.03314.79
5.3.260.0030.03014.69
5.3.250.0100.02314.68
5.3.240.0070.02714.73
5.3.230.0030.03014.62
5.3.220.0070.03314.59
5.3.210.0070.04014.70
5.3.200.0100.02714.64
5.3.190.0030.05314.73
5.3.180.0130.07314.66
5.3.170.0070.07714.61
5.3.160.0130.07314.64
5.3.150.0200.06314.66
5.3.140.0100.08014.71
5.3.130.0000.08014.64
5.3.120.0130.07314.55
5.3.110.0030.08014.60
5.3.100.0170.06714.03
5.3.90.0130.07014.08
5.3.80.0100.07314.14
5.3.70.0130.07014.14
5.3.60.0070.07713.99
5.3.50.0070.07314.07
5.3.40.0100.06713.94
5.3.30.0100.07013.98
5.3.20.0070.06713.81
5.3.10.0100.06713.83
5.3.00.0070.07313.77

preferences:
52.29 ms | 401 KiB | 5 Q