3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myfunc(){ return 'works'; } define('func', 'myfunc'); (func)(); // Error: function "func" not defined $tokens = token_get_all('<?php function myfunc(){ echo \'works\'; } define(\'func\', \'myfunc\'); (func)();'); foreach ($tokens as $token) { if (is_array($token)) { echo "Line {$token[2]}: ", token_name($token[0]), " ('{$token[1]}')", PHP_EOL; } }

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.4.140.0090.01317.59
8.4.130.0130.00817.77
8.4.120.0130.00821.82
8.4.110.0140.00618.96
8.4.100.0060.00420.40
8.4.90.0130.00918.78
8.4.80.0110.00919.48
8.4.70.0170.00917.91
8.4.60.0120.00818.80
8.4.50.0130.00717.76
8.4.40.0100.01017.68
8.4.30.0030.01622.54
8.4.20.0070.01020.76
8.4.10.0000.01019.57
8.3.270.0120.00716.82
8.3.260.0100.00916.54
8.3.250.0120.00718.86
8.3.240.0140.00716.61
8.3.230.0130.00616.50
8.3.220.0100.00818.87
8.3.210.0120.00716.67
8.3.200.0050.00416.49
8.3.190.0060.00217.06
8.3.180.0060.00217.27
8.3.170.0150.00317.23
8.3.160.0150.00416.77
8.3.150.0160.00316.88
8.3.140.0050.00316.48
8.3.130.0060.00318.26
8.3.120.0030.00620.68
8.3.110.0160.00020.94
8.3.100.0090.00924.06
8.3.90.0030.00626.77
8.3.80.0040.00918.43
8.3.70.0150.00016.75
8.3.60.0080.00618.30
8.3.50.0160.00517.31
8.3.40.0080.00818.88
8.3.30.0120.00318.70
8.3.20.0080.00020.90
8.3.10.0030.00521.73
8.3.00.0030.00623.66
8.2.290.0120.00720.57
8.2.280.0120.00918.34
8.2.270.0070.00316.62
8.2.260.0000.00818.96
8.2.250.0030.00616.73
8.2.240.0000.00817.09
8.2.230.0080.00022.58
8.2.220.0090.00037.54
8.2.210.0040.00426.77
8.2.200.0070.00316.50
8.2.190.0120.00316.58
8.2.180.0070.00716.75
8.2.170.0170.00322.96
8.2.160.0030.01020.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0090.00020.52
8.2.100.0070.00417.50
8.2.90.0040.00418.22
8.2.80.0100.00317.97
8.2.70.0040.00418.03
8.2.60.0030.00517.91
8.2.50.0060.00318.10
8.2.40.0000.00820.41
8.2.30.0000.00719.32
8.2.20.0000.00718.12
8.2.10.0050.00319.26
8.2.00.0040.00419.23
8.1.330.0120.00721.98
8.1.320.0100.00916.16
8.1.310.0120.00618.34
8.1.300.0160.00419.35
8.1.290.0080.00018.88
8.1.280.0090.01225.92
8.1.270.0080.00023.86
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00324.03
8.1.230.0080.00422.70
8.1.220.0050.00317.79
8.1.210.0000.00818.88
8.1.200.0050.00317.38
8.1.190.0000.00817.22
8.1.180.0060.00318.10
8.1.170.0030.00618.75
8.1.160.0000.00818.80
8.1.150.0040.00418.80
8.1.140.0050.00318.87
8.1.130.0070.00020.05
8.1.120.0040.00417.48
8.1.110.0030.00617.44
8.1.100.0000.00717.35
8.1.90.0000.00717.49
8.1.80.0030.00617.38
8.1.70.0030.00317.51
8.1.60.0040.00417.50
8.1.50.0030.00517.41
8.1.40.0060.00317.48
8.1.30.0000.00817.69
8.1.20.0040.00417.57
8.1.10.0080.00017.46
8.1.00.0040.00417.48
8.0.300.0040.00420.04
8.0.290.0100.00016.75
8.0.280.0070.00018.34
8.0.270.0070.00017.26
8.0.260.0030.00318.41
8.0.250.0070.00016.97
8.0.240.0060.00316.86
8.0.230.0050.00216.88
8.0.220.0050.00216.92
8.0.210.0030.00316.80
8.0.200.0040.00417.00
8.0.190.0000.00716.85
8.0.180.0040.00416.98
8.0.170.0030.00616.82
8.0.160.0040.00416.96
8.0.150.0000.00716.83
8.0.140.0080.00016.79
8.0.130.0030.00313.30
8.0.120.0040.00416.92
8.0.110.0040.00416.90
8.0.100.0000.00716.93
8.0.90.0000.00716.80
8.0.80.0080.00616.86
8.0.70.0030.00316.86
8.0.60.0060.00316.77
8.0.50.0080.00016.91
8.0.30.0120.00616.99
8.0.20.0060.01417.11
8.0.10.0070.00016.82
8.0.00.0140.00616.91
7.4.330.0030.00215.55
7.4.320.0000.00616.44
7.4.300.0000.00616.56
7.4.290.0030.00316.61
7.4.280.0030.00516.61
7.4.270.0000.00616.41
7.4.260.0050.00316.49
7.4.250.0030.00316.51
7.4.240.0020.00516.61
7.4.230.0070.00016.35
7.4.220.0030.00516.59
7.4.210.0100.00916.65
7.4.200.0070.00016.51
7.4.160.0050.01216.57
7.4.130.0070.01116.48
7.4.120.0130.00816.57
7.4.110.0170.00016.50
7.4.100.0140.00316.39
7.4.90.0060.01016.49
7.4.80.0180.00419.39
7.4.70.0060.01216.58
7.4.60.0200.00816.56
7.4.50.0140.00316.48
7.4.40.0070.01016.45
7.4.30.0090.00916.46
7.4.20.0090.00916.30
7.4.10.0110.00716.44
7.4.00.0110.00715.63
7.3.330.0050.00013.38
7.3.320.0030.00313.34
7.3.310.0030.00316.25
7.3.300.0040.00416.34
7.3.290.0090.00616.31
7.3.280.0110.00816.22
7.3.260.0100.01016.43
7.3.230.0080.00816.49
7.3.210.0110.00716.55
7.3.200.0100.00716.39
7.3.190.0070.01016.50
7.3.180.0070.01016.49
7.3.170.0150.00316.29
7.3.160.0090.00916.34
7.3.150.0150.00316.31
7.3.140.0070.01116.21
7.3.130.0100.00916.43
7.3.120.0130.00816.29
7.3.110.0030.01516.25
7.3.100.0060.01216.43
7.3.90.0030.01516.21
7.3.80.0100.00716.53
7.3.70.0070.01516.22
7.3.60.0080.00715.50
7.3.50.0040.01115.63
7.3.40.0080.00615.51
7.3.30.0070.00715.70
7.3.20.0070.01116.57
7.3.10.0130.00816.45
7.3.00.0080.00816.45
7.2.330.0060.01216.79
7.2.320.0070.01116.55
7.2.310.0100.00716.87
7.2.300.0130.00916.77
7.2.290.0110.00816.44
7.2.280.0170.00316.39
7.2.270.0150.00316.71
7.2.260.0140.00516.46
7.2.250.0110.01116.48
7.2.240.0090.00916.56
7.2.230.0060.01216.67
7.2.220.0140.01016.57
7.2.210.0110.01116.28
7.2.200.0080.01116.48
7.2.190.0090.00915.75
7.2.180.0080.01115.68
7.2.170.0070.00715.82
7.2.160.0080.00615.75
7.2.150.0090.01016.85
7.2.140.0090.00716.75
7.2.130.0080.01016.90
7.2.120.0090.00616.57
7.2.110.0060.00916.94
7.2.100.0070.00716.52
7.2.90.0100.01016.73
7.2.80.0100.01216.69
7.2.70.0080.00816.67
7.2.60.0110.01116.56
7.2.50.0080.00916.77
7.2.40.0050.01116.77
7.2.30.0110.01016.88
7.2.20.0080.00916.76
7.2.10.0150.00716.61
7.2.00.0070.00916.78
7.1.330.0210.00815.46
7.1.320.0490.01015.72
7.1.310.0160.01015.55
7.1.300.0120.00915.67
7.1.290.0080.01315.76
7.1.280.0090.01115.61
7.1.270.0110.00715.68
7.1.260.0150.00815.53
7.1.250.0130.00715.64
7.1.240.0170.01015.40
7.1.230.0180.01215.56
7.1.220.0260.00615.54
7.1.210.0160.01315.43
7.1.200.0220.00615.44
7.1.190.0230.00315.37
7.1.180.0170.01315.43
7.1.170.0180.01515.46
7.1.160.0090.01315.47
7.1.150.0070.01815.69
7.1.140.0160.01215.57
7.1.130.0220.00315.56
7.1.120.0170.00315.51
7.1.110.0180.00915.55
7.1.100.0160.00715.44
7.1.90.0220.01215.54
7.1.80.0160.00815.41
7.1.70.0240.00415.72
7.1.60.0110.01515.32
7.1.50.0240.01015.59
7.1.40.0230.00917.39
7.1.30.0170.00617.37
7.1.20.0170.01317.09
7.1.10.0210.00917.44
7.1.00.0170.00717.15
7.0.330.0090.01815.20
7.0.320.0190.00615.25
7.0.310.0090.01315.00
7.0.300.0250.00915.29
7.0.290.0120.01215.06
7.0.280.0120.00915.17
7.0.270.0150.00915.26
7.0.260.0170.00615.16
7.0.250.0130.01115.14
7.0.240.0140.00715.13
7.0.230.0260.00015.15
7.0.220.0180.01115.25
7.0.210.0240.00315.12
7.0.200.0170.00915.12
7.0.190.0150.01217.01
7.0.180.0240.00716.85
7.0.170.0220.01017.07
7.0.160.0200.00717.14
7.0.150.0110.01616.95
7.0.140.0070.01616.86
7.0.130.0130.01316.99
7.0.120.0150.01117.13
7.0.110.0080.01616.86
7.0.100.0140.01117.06
7.0.90.0220.00416.87
7.0.80.0100.01217.17
7.0.70.0160.00516.97
7.0.60.0110.01416.68
7.0.50.0150.00617.05
7.0.40.0110.00717.06
7.0.30.0050.01416.82
7.0.20.0210.01117.09
7.0.10.0110.01117.06
7.0.00.0170.00616.93
5.6.400.0200.00615.74
5.6.390.0090.01915.40
5.6.380.0120.01215.42
5.6.370.0110.01415.64
5.6.360.0130.01015.30
5.6.350.0110.00815.34
5.6.340.0170.00315.26
5.6.330.0120.00915.70
5.6.320.0180.00915.66
5.6.310.0110.01115.35
5.6.300.0190.00915.74
5.6.290.0150.01215.57
5.6.280.0060.01615.73
5.6.270.0100.01815.76
5.6.260.0050.02215.52
5.6.250.0220.00615.85
5.6.240.0040.01815.71
5.6.230.0210.00315.64
5.6.220.0090.01515.75
5.6.210.0240.00015.61
5.6.200.0210.00715.68
5.6.190.0040.02215.73
5.6.180.0140.00515.49
5.6.170.0130.00915.61
5.6.160.0140.01015.43
5.6.150.0130.00915.46
5.6.140.0120.01215.52
5.6.130.0150.00715.59
5.6.120.0140.00815.56
5.6.110.0130.01015.66
5.6.100.0100.01315.53
5.6.90.0190.00815.75
5.6.80.0180.00415.53
5.6.70.0130.00815.59
5.6.60.0120.01115.66
5.6.50.0150.01015.48
5.6.40.0210.00915.54
5.6.30.0140.00915.34
5.6.20.0180.00715.62
5.6.10.0160.00815.46
5.6.00.0070.01415.38
5.5.380.0300.00015.68
5.5.370.0170.01315.51
5.5.360.0130.01615.61
5.5.350.0190.01915.76
5.5.340.0170.01715.50
5.5.330.0230.00815.61
5.5.320.0270.00815.53
5.5.310.0170.01515.64
5.5.300.0250.00815.90
5.5.290.0190.01115.64
5.5.280.0250.00415.53
5.5.270.0240.00615.64
5.5.260.0130.01615.65
5.5.250.0300.00715.59
5.5.240.0280.00315.53
5.5.230.0130.01715.66
5.5.220.0080.02015.73
5.5.210.0240.00715.45
5.5.200.0220.00915.52
5.5.190.0180.01215.27
5.5.180.0170.01115.67
5.5.170.0200.01315.49
5.5.160.0140.01415.50
5.5.150.0260.00315.56
5.5.140.0230.00415.53
5.5.130.0190.01115.23
5.5.120.0180.01215.50
5.5.110.0180.01415.44
5.5.100.0140.01415.28
5.5.90.0250.01015.54
5.5.80.0240.01015.43
5.5.70.0210.00815.49
5.5.60.0170.01215.57
5.5.50.0160.01615.45
5.5.40.0190.00815.51
5.5.30.0190.01015.50
5.5.20.0200.00715.42
5.5.10.0090.01815.49
5.5.00.0200.00815.56
5.4.450.0110.01112.34
5.4.440.0170.00412.51
5.4.430.0140.01012.51
5.4.420.0210.00612.48
5.4.410.0110.01112.25
5.4.400.0230.00012.47
5.4.390.0150.00812.30
5.4.380.0190.00812.43
5.4.370.0110.01212.33
5.4.360.0160.00612.21
5.4.350.0200.00312.30
5.4.340.0200.00312.32
5.4.330.0160.00812.37
5.4.320.0220.00612.57
5.4.310.0170.00712.27
5.4.300.0160.00512.25
5.4.290.0250.00312.52
5.4.280.0120.01212.18
5.4.270.0120.00912.46
5.4.260.0130.01212.29
5.4.250.0140.01412.50
5.4.240.0170.00712.43
5.4.230.0160.00812.29
5.4.220.0120.00912.14
5.4.210.0140.01012.37
5.4.200.0120.01212.13
5.4.190.0140.00812.40
5.4.180.0180.00412.34
5.4.170.0090.01312.22
5.4.160.0150.00612.44
5.4.150.0180.00312.25
5.4.140.0110.01112.33
5.4.130.0240.00012.23
5.4.120.0100.01312.37
5.4.110.0150.00512.50
5.4.100.0130.00712.16
5.4.90.0100.01012.23
5.4.80.0130.00712.40
5.4.70.0180.00412.48
5.4.60.0100.01312.50
5.4.50.0140.00612.52
5.4.40.0140.00612.50
5.4.30.0100.01012.36
5.4.20.0130.00712.19
5.4.10.0100.01012.43
5.4.00.0040.01812.34
5.3.290.0180.00612.91
5.3.280.0200.00512.91
5.3.270.0190.00312.68
5.3.260.0180.00412.69
5.3.250.0130.00912.66
5.3.240.0160.00812.64
5.3.230.0160.01012.71
5.3.220.0100.01512.65
5.3.210.0090.01412.69
5.3.200.0120.00912.58
5.3.190.0110.01112.75
5.3.180.0050.01612.87
5.3.170.0100.01012.88
5.3.160.0140.00712.88
5.3.150.0170.00612.90
5.3.140.0200.00312.83
5.3.130.0090.01312.90
5.3.120.0140.00912.85
5.3.110.0130.01012.74
5.3.100.0160.00712.85
5.3.90.0160.00712.79
5.3.80.0090.01212.72
5.3.70.0080.01612.69
5.3.60.0090.01312.81
5.3.50.0110.01112.73
5.3.40.0150.00612.74
5.3.30.0150.00612.83
5.3.20.0140.00812.75
5.3.10.0150.00612.54
5.3.00.0170.00612.54
5.2.170.0050.01411.83
5.2.160.0070.01211.83
5.2.150.0080.01011.75
5.2.140.0130.00711.77
5.2.130.0110.00711.97
5.2.120.0100.01011.77
5.2.110.0150.00611.87
5.2.100.0060.01311.79
5.2.90.0120.00611.75
5.2.80.0180.00511.74
5.2.70.0120.01211.63
5.2.60.0090.00911.64
5.2.50.0030.01611.76
5.2.40.0110.00711.85
5.2.30.0060.01211.71
5.2.20.0090.00911.48
5.2.10.0110.00711.54
5.2.00.0080.01211.32
5.1.60.0170.00010.79
5.1.50.0120.00610.83
5.1.40.0060.01011.09
5.1.30.0130.00311.02
5.1.20.0150.00310.89
5.1.10.0080.00810.91
5.1.00.0120.00910.56
5.0.50.0050.00810.56
5.0.40.0120.00210.56
5.0.30.0070.01110.56
5.0.20.0060.00910.56
5.0.10.0040.00910.56
5.0.00.0110.00610.56
4.4.90.0000.01010.56
4.4.80.0050.00510.56
4.4.70.0000.00910.56
4.4.60.0060.00310.56
4.4.50.0060.00310.56
4.4.40.0050.00510.56
4.4.30.0040.00410.56
4.4.20.0100.00010.56
4.4.10.0050.00510.56
4.4.00.0070.00210.56
4.3.110.0080.00010.56
4.3.100.0080.00310.56
4.3.90.0090.00010.56
4.3.80.0040.00410.56
4.3.70.0100.00010.56
4.3.60.0000.01110.56
4.3.50.0030.00610.56
4.3.40.0060.00310.56
4.3.30.0060.00110.56
4.3.20.0040.00410.56
4.3.10.0030.00410.56
4.3.00.0040.00410.56

preferences:
33.7 ms | 403 KiB | 5 Q