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 ( ) '); 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.63
8.3.50.0110.00418.05
8.3.40.0110.00318.77
8.3.30.0090.00618.79
8.3.20.0000.00720.29
8.3.10.0050.00321.86
8.3.00.0040.00419.25
8.2.180.0060.01016.88
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00017.50
8.2.120.0040.00426.35
8.2.110.0100.00022.27
8.2.100.0100.00317.75
8.2.90.0080.00019.26
8.2.80.0000.00817.97
8.2.70.0030.00517.75
8.2.60.0030.00517.93
8.2.50.0030.00518.07
8.2.40.0030.00919.41
8.2.30.0040.00420.51
8.2.20.0030.00617.58
8.2.10.0000.00818.13
8.2.00.0080.00018.13
8.1.280.0030.01225.92
8.1.270.0080.00023.96
8.1.260.0000.00728.09
8.1.250.0050.00328.09
8.1.240.0030.00622.64
8.1.230.0060.00620.93
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00717.69
8.1.180.0050.00318.10
8.1.170.0040.00418.78
8.1.160.0040.00422.03
8.1.150.0040.00418.80
8.1.140.0040.00419.55
8.1.130.0000.00817.75
8.1.120.0060.00317.50
8.1.110.0070.00017.35
8.1.100.0040.00417.36
8.1.90.0070.00017.52
8.1.80.0050.00317.34
8.1.70.0030.00517.45
8.1.60.0060.00317.50
8.1.50.0030.00617.39
8.1.40.0090.00017.45
8.1.30.0030.00517.52
8.1.20.0040.00417.47
8.1.10.0040.00417.61
8.1.00.0060.00317.47
8.0.300.0030.00618.77
8.0.290.0060.00316.75
8.0.280.0070.00018.50
8.0.270.0020.00517.27
8.0.260.0030.00617.18
8.0.250.0000.00916.89
8.0.240.0080.00017.02
8.0.230.0030.00317.04
8.0.220.0070.00016.97
8.0.210.0050.00316.86
8.0.200.0030.00317.11
8.0.190.0050.00517.07
8.0.180.0030.00616.97
8.0.170.0000.00816.90
8.0.160.0000.00816.95
8.0.150.0040.00416.89
8.0.140.0030.00716.98
8.0.130.0030.00313.44
8.0.120.0000.00716.82
8.0.110.0040.00416.87
8.0.100.0070.00016.87
8.0.90.0050.00216.84
8.0.80.0030.01116.95
8.0.70.0000.00816.95
8.0.60.0040.00416.92
8.0.50.0040.00416.81
8.0.30.0070.01117.05
8.0.20.0080.01117.40
8.0.10.0040.00417.09
8.0.00.0150.01116.87
7.4.330.0000.00516.71
7.4.320.0070.00016.60
7.4.300.0040.00416.56
7.4.290.0030.00616.59
7.4.280.0000.00716.43
7.4.270.0070.00016.67
7.4.260.0080.00216.49
7.4.250.0000.00716.58
7.4.240.0020.00616.62
7.4.230.0030.00316.41
7.4.220.0060.01316.46
7.4.210.0060.01216.55
7.4.200.0000.00816.41
7.4.160.0090.00616.32
7.4.150.0090.01217.40
7.4.140.0110.01117.86
7.4.130.0150.00816.52
7.4.120.0110.00716.53
7.4.110.0150.00316.55
7.4.100.0100.01016.54
7.4.90.0180.00416.45
7.4.80.0030.01319.39
7.4.70.0140.00716.46
7.4.60.0130.00716.59
7.4.50.0070.01116.36
7.4.40.0130.00316.45
7.4.30.0080.00816.60
7.4.10.0030.01014.85
7.4.00.0030.01314.79
7.3.330.0000.00813.34
7.3.320.0030.00313.40
7.3.310.0030.00316.41
7.3.300.0020.00516.39
7.3.290.0070.00816.39
7.3.280.0070.01016.38
7.3.270.0110.00717.40
7.3.260.0070.01416.39
7.3.250.0090.00916.45
7.3.240.0080.01016.40
7.3.230.0180.00016.56
7.3.210.0040.01216.33
7.3.200.0030.01316.70
7.3.190.0070.01416.29
7.3.180.0100.00616.31
7.3.170.0040.01216.46
7.3.160.0090.00616.48
7.3.130.0100.01014.70
7.3.120.0090.00614.80
7.3.110.0070.01114.88
7.3.100.0070.00714.77
7.3.90.0070.01014.56
7.3.80.0030.01214.76
7.3.70.0000.01514.77
7.3.60.0090.00914.72
7.3.50.0060.00614.90
7.3.40.0050.00514.70
7.3.30.0140.00614.85
7.3.20.0060.00916.86
7.3.10.0060.00916.71
7.3.00.0050.01016.69
7.2.330.0110.00816.43
7.2.320.0140.00716.41
7.2.310.0140.00316.82
7.2.300.0100.00716.76
7.2.290.0060.01016.78
7.2.260.0060.01215.09
7.2.250.0030.01615.28
7.2.240.0120.00015.19
7.2.230.0030.01315.31
7.2.220.0120.00615.08
7.2.210.0000.01515.14
7.2.200.0080.00415.00
7.2.190.0070.01314.87
7.2.180.0020.01515.06
7.2.170.0100.01014.85
7.2.160.0030.01315.16
7.2.150.0060.00916.96
7.2.140.0030.01016.79
7.2.130.0120.00516.94
7.2.120.0060.01016.88
7.2.110.0070.00516.93
7.2.100.0030.01016.73
7.2.90.0060.00616.93
7.2.80.0050.00517.08
7.2.70.0050.00817.01
7.2.60.0030.00817.03
7.2.50.0090.00516.99
7.2.40.0050.00616.92
7.2.30.0030.00817.01
7.2.20.0060.00717.02
7.2.10.0050.01017.05
7.2.00.0030.01117.84
7.1.330.0060.00915.68
7.1.320.0040.00815.74
7.1.310.0030.01315.59
7.1.300.0030.01815.82
7.1.290.0080.00815.88
7.1.280.0060.00615.52
7.1.270.0040.00415.59
7.1.260.0070.00416.02
7.1.250.0050.00915.69
7.1.240.0000.01315.89
7.1.230.0120.00315.87
7.1.220.0000.00915.90
7.1.210.0080.00315.71
7.1.200.0090.00615.67
7.1.190.0060.00315.62
7.1.180.0060.00315.71
7.1.170.0060.00315.76
7.1.160.0120.00315.82
7.1.150.0060.00315.54
7.1.140.0000.01815.62
7.1.130.0040.01115.56
7.1.120.0040.01015.48
7.1.110.0040.00815.86
7.1.100.0020.01017.00
7.1.90.0050.00516.05
7.1.80.0000.01715.73
7.1.70.0030.01216.24
7.1.60.0070.01217.65
7.1.50.0160.01025.24
7.1.40.0060.01015.79
7.1.30.0030.01515.74
7.1.20.0100.00315.79
7.1.10.0000.00815.67
7.1.00.0030.04319.00
7.0.330.0060.01015.38
7.0.320.0000.01315.20
7.0.310.0040.00815.21
7.0.300.0040.01215.28
7.0.290.0000.00815.39
7.0.280.0060.00615.23
7.0.270.0080.00815.55
7.0.260.0000.01115.48
7.0.250.0120.00315.52
7.0.240.0030.01215.53
7.0.230.0000.01415.11
7.0.220.0000.01115.25
7.0.210.0070.01015.44
7.0.200.0040.00716.20
7.0.190.0030.01415.42
7.0.180.0070.01015.27
7.0.170.0130.00615.25
7.0.160.0070.01015.28
7.0.150.0030.01015.40
7.0.140.0060.01015.47
7.0.130.0060.00915.45
7.0.120.0120.00315.30
7.0.110.0070.00715.54
7.0.100.0040.01215.28
7.0.90.0100.00315.29
7.0.80.0060.00315.47
7.0.70.0050.00515.45
7.0.60.0050.04417.58
7.0.50.0030.03416.73
7.0.40.0030.05016.76
7.0.30.0260.04316.90
7.0.20.0150.02916.65
7.0.10.0030.05016.81
7.0.00.0060.04516.87
5.6.400.0050.00514.36
5.6.390.0100.00714.58
5.6.380.0100.00614.36
5.6.370.0090.00614.66
5.6.360.0060.00314.28
5.6.350.0030.01214.37
5.6.340.0030.01314.58
5.6.330.0070.01114.69
5.6.320.0040.01214.59
5.6.310.0100.00314.30
5.6.300.0040.01214.83
5.6.290.0060.00614.37
5.6.280.0080.03217.69
5.6.270.0120.00414.58
5.6.260.0070.00714.57
5.6.250.0040.01414.40
5.6.240.0070.00314.16
5.6.230.0070.00714.19
5.6.220.0060.00914.41
5.6.210.0050.04817.51
5.6.200.0060.02116.37
5.6.190.0080.02117.60
5.6.180.0280.03517.32
5.6.170.0110.02517.55
5.6.160.0050.02317.45
5.6.150.0040.02716.35
5.6.140.0050.04116.51
5.6.130.0090.02216.29
5.6.120.0090.04117.78
5.6.110.0100.04417.74
5.6.100.0040.04017.79
5.6.90.0070.04717.61
5.6.80.0030.04517.27
5.6.70.0100.00714.62
5.6.60.0030.00914.38
5.6.50.0000.01214.23
5.6.40.0030.01714.56
5.6.30.0070.01314.51
5.6.20.0090.00614.25
5.6.10.0060.01314.39
5.6.00.0000.01714.22
5.5.380.0000.00914.48
5.5.370.0060.00614.51
5.5.360.0070.00414.14
5.5.350.0090.02817.49
5.5.340.0060.02916.02
5.5.330.0100.04117.45
5.5.320.0220.03517.41
5.5.310.0160.02217.61
5.5.300.0100.02816.28
5.5.290.0120.04216.29
5.5.280.0070.02217.65
5.5.270.0060.02417.73
5.5.260.0120.03517.62
5.5.250.0070.04617.52
5.5.240.0180.04717.12
5.5.230.0100.01014.21
5.5.220.0040.01114.34
5.5.210.0060.00614.53
5.5.200.0030.01014.50
5.5.190.0070.01114.49
5.5.180.0090.00614.25
5.5.170.0120.00013.86
5.5.160.0090.00614.20
5.5.150.0090.00313.96
5.5.140.0000.01414.08
5.5.130.0080.00314.17
5.5.120.0070.00314.13
5.5.110.0000.01314.20
5.5.100.0160.00014.38
5.5.90.0070.01014.40
5.5.80.0030.00914.16
5.5.70.0030.01414.27
5.5.60.0060.00614.40
5.5.50.0070.01114.49
5.5.40.0040.01514.19
5.5.30.0130.00314.53
5.5.20.0060.00914.30
5.5.10.0110.00314.09
5.5.00.0060.00314.07

preferences:
46.77 ms | 400 KiB | 5 Q