3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Token { function __construct($type = null, $content, $line = null){ $this->type = $type; $this->content = $content; $this->line = $line; } } $tokens = token_get_all('<?php foo > bar isset($var)'); foreach($tokens as $offset => $token){ $tokens[$offset] = is_array($token) ? new Token($token[0], $token[1], $token[2]) : new Token(null, $token, null); } print_r($tokens);

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.00616.75
8.3.50.0170.01018.18
8.3.40.0070.00718.59
8.3.30.0110.00418.84
8.3.20.0040.00420.34
8.3.10.0030.00623.61
8.3.00.0090.00019.26
8.2.180.0060.01216.38
8.2.170.0140.00022.96
8.2.160.0100.00320.48
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00017.75
8.2.120.0000.00826.35
8.2.110.0000.00922.27
8.2.100.0040.00817.97
8.2.90.0000.00819.20
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0080.00018.05
8.2.50.0080.00018.07
8.2.40.0040.00419.46
8.2.30.0040.00420.56
8.2.20.0040.00417.70
8.2.10.0000.00818.13
8.2.00.0000.00818.13
8.1.280.0150.00625.92
8.1.270.0060.00322.02
8.1.260.0070.00028.09
8.1.250.0000.00728.09
8.1.240.0090.00023.92
8.1.230.0000.01119.10
8.1.220.0030.00517.79
8.1.210.0000.00818.77
8.1.200.0100.00017.35
8.1.190.0000.00817.36
8.1.180.0030.00518.10
8.1.170.0040.00418.67
8.1.160.0000.00722.02
8.1.150.0040.00418.79
8.1.140.0080.00019.55
8.1.130.0000.00717.71
8.1.120.0070.00017.45
8.1.110.0000.00717.35
8.1.100.0000.00717.46
8.1.90.0040.00417.38
8.1.80.0000.00717.43
8.1.70.0040.00417.37
8.1.60.0030.00617.63
8.1.50.0080.00017.54
8.1.40.0040.00417.51
8.1.30.0030.00617.65
8.1.20.0040.00417.68
8.1.10.0050.00217.50
8.1.00.0080.00017.41
8.0.300.0070.00018.77
8.0.290.0050.00316.63
8.0.280.0030.00318.30
8.0.270.0000.00817.21
8.0.260.0030.00317.14
8.0.250.0030.00316.98
8.0.240.0000.00716.88
8.0.230.0030.00317.01
8.0.220.0070.00016.93
8.0.210.0030.00417.00
8.0.200.0060.00016.90
8.0.190.0050.00317.02
8.0.180.0030.00516.98
8.0.170.0020.00517.03
8.0.160.0030.00316.97
8.0.150.0040.00416.87
8.0.140.0030.00316.93
8.0.130.0000.00713.39
8.0.120.0000.00816.96
8.0.110.0000.00817.01
8.0.100.0050.00316.92
8.0.90.0030.00616.85
8.0.80.0040.01116.85
8.0.70.0070.00016.94
8.0.60.0040.00416.98
8.0.50.0040.00416.93
8.0.30.0140.00617.18
8.0.20.0090.01017.41
8.0.10.0040.00416.95
8.0.00.0090.00816.83
7.4.330.0050.00016.73
7.4.320.0070.00016.59
7.4.300.0060.00016.46
7.4.290.0000.00716.53
7.4.280.0000.00716.65
7.4.270.0030.00316.57
7.4.260.0000.00716.59
7.4.250.0040.00416.38
7.4.240.0000.00716.56
7.4.230.0070.00016.33
7.4.220.0060.01216.55
7.4.210.0040.01516.54
7.4.200.0040.00416.36
7.4.160.0100.00316.52
7.4.150.0060.01217.40
7.4.140.0090.01217.86
7.4.130.0080.01116.54
7.4.120.0060.01116.52
7.4.110.0130.00316.47
7.4.100.0130.01316.42
7.4.90.0040.01316.52
7.4.80.0090.00619.39
7.4.70.0060.01216.68
7.4.60.0030.01216.39
7.4.50.0000.01316.64
7.4.40.0100.00616.53
7.4.30.0110.00816.48
7.4.10.0000.01715.08
7.4.00.0070.00914.86
7.3.330.0000.00813.33
7.3.320.0000.00613.38
7.3.310.0050.00516.19
7.3.300.0030.00316.37
7.3.290.0100.00716.39
7.3.280.0090.00916.36
7.3.270.0110.00617.40
7.3.260.0090.00616.42
7.3.250.0100.00616.55
7.3.240.0130.00816.42
7.3.230.0100.01016.39
7.3.210.0070.01116.59
7.3.200.0080.00816.43
7.3.190.0110.00516.51
7.3.180.0120.00316.55
7.3.170.0090.00616.59
7.3.160.0160.00616.68
7.3.130.0080.01115.13
7.3.120.0060.01215.09
7.3.110.0040.01214.80
7.3.100.0070.00714.81
7.3.90.0030.00914.87
7.3.80.0030.01014.66
7.3.70.0070.00714.98
7.3.60.0080.00814.88
7.3.50.0090.00614.84
7.3.40.0130.00014.63
7.3.30.0060.00614.99
7.3.20.0070.00716.73
7.3.10.0030.01116.40
7.3.00.0110.00416.52
7.2.330.0140.00716.50
7.2.320.0120.00616.46
7.2.310.0060.00916.85
7.2.300.0100.00616.86
7.2.290.0140.00716.61
7.2.260.0060.01315.25
7.2.250.0110.00715.18
7.2.240.0030.01315.07
7.2.230.0030.01015.14
7.2.220.0040.00715.03
7.2.210.0120.00315.19
7.2.200.0110.00415.06
7.2.190.0060.00915.06
7.2.180.0090.00615.04
7.2.170.0000.01415.21
7.2.160.0100.00314.80
7.2.150.0000.01217.02
7.2.140.0070.00417.00
7.2.130.0080.00816.93
7.2.120.0030.01317.02
7.2.110.0120.00316.82
7.2.100.0030.01016.71
7.2.90.0100.00016.79
7.2.80.0060.00617.02
7.2.70.0090.00616.79
7.2.60.0160.00316.85
7.2.50.0090.00617.14
7.2.40.0130.00316.93
7.2.30.0100.00616.82
7.2.20.0030.01216.94
7.2.10.0090.00016.84
7.2.00.0110.00818.15
7.1.330.0030.01015.88
7.1.320.0080.00016.00
7.1.310.0030.01015.89
7.1.300.0030.00715.79
7.1.290.0040.01215.86
7.1.280.0060.00315.51
7.1.270.0070.00715.79
7.1.260.0030.01415.89
7.1.250.0090.00615.86
7.1.240.0030.01215.94
7.1.230.0060.00915.93
7.1.220.0100.00715.86
7.1.210.0090.00615.82
7.1.200.0050.00915.80
7.1.190.0090.00615.91
7.1.180.0030.00715.71
7.1.170.0040.00715.91
7.1.160.0030.01015.70
7.1.150.0080.00415.93
7.1.140.0040.01215.82
7.1.130.0030.01015.89
7.1.120.0000.00915.76
7.1.110.0090.00015.53
7.1.100.0060.00817.04
7.1.90.0040.00415.86
7.1.80.0090.00615.93
7.1.70.0050.01116.56
7.1.60.0080.01017.67
7.1.50.0050.01016.45
7.1.40.0100.00715.82
7.1.30.0070.00715.88
7.1.20.0000.01215.92
7.1.10.0040.00815.90
7.1.00.0080.03919.04
7.0.330.0030.01015.49
7.0.320.0060.01015.36
7.0.310.0040.00815.32
7.0.300.0070.00415.23
7.0.290.0030.00915.41
7.0.280.0070.00715.49
7.0.270.0030.01015.49
7.0.260.0070.00715.36
7.0.250.0040.01115.61
7.0.240.0040.00815.56
7.0.230.0000.01415.52
7.0.220.0130.00315.38
7.0.210.0060.01015.52
7.0.200.0030.00716.07
7.0.190.0110.00715.29
7.0.180.0070.00715.45
7.0.170.0060.00615.34
7.0.160.0070.00315.49
7.0.150.0070.00315.44
7.0.140.0040.00815.53
7.0.130.0030.01215.54
7.0.120.0040.01515.36
7.0.110.0080.00815.48
7.0.100.0120.00015.60
7.0.90.0060.00915.54
7.0.80.0060.00915.51
7.0.70.0030.00615.45
7.0.60.0060.03817.51
7.0.50.0070.02816.76
7.0.40.0020.03516.89
7.0.30.0090.02616.94
7.0.20.0190.04016.82
7.0.10.0070.04816.71
7.0.00.0090.02516.81
5.6.400.0060.00914.68
5.6.390.0030.01414.71
5.6.380.0090.00314.70
5.6.370.0070.01114.69
5.6.360.0030.00614.55
5.6.350.0060.00314.64
5.6.340.0070.00414.62
5.6.330.0070.00714.31
5.6.320.0000.01714.46
5.6.310.0060.00914.57
5.6.300.0040.00714.50
5.6.290.0040.00814.27
5.6.280.0020.04217.70
5.6.270.0030.01014.55
5.6.260.0030.01014.53
5.6.250.0030.01014.40
5.6.240.0000.01314.49
5.6.230.0100.00714.35
5.6.220.0120.00014.45
5.6.210.0150.04017.48
5.6.200.0100.04816.26
5.6.190.0110.02517.58
5.6.180.0270.04017.48
5.6.170.0130.02517.60
5.6.160.0070.04517.46
5.6.150.0090.04216.42
5.6.140.0050.04316.20
5.6.130.0060.03616.14
5.6.120.0170.03117.75
5.6.110.0100.02217.87
5.6.100.0120.04317.92
5.6.90.0060.05017.78
5.6.80.0050.02417.31
5.6.70.0060.00314.19
5.6.60.0090.00614.38
5.6.50.0100.01014.43
5.6.40.0030.01014.15
5.6.30.0130.00014.54
5.6.20.0120.00614.58
5.6.10.0030.00714.45
5.6.00.0040.01114.13
5.5.380.0090.00314.38
5.5.370.0030.01314.38
5.5.360.0120.00014.63
5.5.350.1580.01917.27
5.5.340.0060.02316.15
5.5.330.0080.04317.38
5.5.320.0130.03617.20
5.5.310.0170.02817.22
5.5.300.0060.02216.03
5.5.290.0070.02916.32
5.5.280.0050.02817.63
5.5.270.0060.02317.52
5.5.260.0060.04317.51
5.5.250.0020.03017.56
5.5.240.0120.03317.22
5.5.230.0030.01614.34
5.5.220.0090.00314.14
5.5.210.0050.00514.31
5.5.200.0130.00314.21
5.5.190.0060.01314.38
5.5.180.0040.00714.48
5.5.170.0040.01114.12
5.5.160.0070.00714.53
5.5.150.0040.00814.43
5.5.140.0040.00714.20
5.5.130.0070.00714.34
5.5.120.0120.00614.30
5.5.110.0130.00314.47
5.5.100.0070.01114.28
5.5.90.0120.00314.55
5.5.80.0060.00914.44
5.5.70.0140.00014.36
5.5.60.0040.00714.08
5.5.50.0000.01014.09
5.5.40.0080.00814.52
5.5.30.0100.00714.34
5.5.20.0110.00414.62
5.5.10.0040.01114.57
5.5.00.0100.00714.39

preferences:
73.39 ms | 400 KiB | 5 Q