3v4l.org

run code in 300+ PHP versions simultaneously
<?php $timestart = microtime( true ); $string = "This is an?example string"; for( $i=0; $i<=10; $i++ ) $result = strtok( $string, '?' ); $timeend = microtime( true ); $timetotal = $timeend - $timestart; $r = number_format( $timetotal, 3 ); echo $r; echo $result;

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)
7.4.10.0120.00314.93
7.4.00.0070.01014.99
7.3.130.0080.00814.95
7.3.120.0100.00714.58
7.3.110.0070.01014.99
7.3.100.0060.00914.83
7.3.90.0070.01014.81
7.3.80.0070.00714.92
7.3.70.0060.00614.73
7.3.60.0110.00414.77
7.3.50.0030.01014.89
7.3.40.0070.00414.53
7.3.30.0110.00314.81
7.3.20.0070.01016.56
7.3.10.0100.01016.71
7.3.00.0070.01016.67
7.2.260.0060.01215.06
7.2.250.0040.00714.72
7.2.240.0100.00715.18
7.2.230.0000.01514.59
7.2.220.0060.00615.05
7.2.210.0060.00614.93
7.2.200.0090.00615.16
7.2.190.0040.01014.89
7.2.180.0060.01015.25
7.2.170.0070.00714.86
7.2.160.0000.01514.96
7.2.150.0090.00616.91
7.2.140.0060.00617.01
7.2.130.0000.01116.90
7.2.120.0000.01316.97
7.2.110.0040.00817.05
7.2.100.0060.00916.84
7.2.90.0100.00716.93
7.2.80.0120.00616.92
7.2.70.0070.00316.80
7.2.60.0000.01516.84
7.2.50.0030.01316.97
7.2.40.0060.00617.03
7.2.30.0110.00717.03
7.2.20.0030.01116.90
7.2.10.0090.00316.63
7.2.00.0000.01118.13
7.1.330.0060.00615.71
7.1.320.0090.00615.89
7.1.310.0080.00415.66
7.1.300.0060.00915.73
7.1.290.0060.00615.68
7.1.280.0030.01215.74
7.1.270.0000.00915.68
7.1.260.0090.00615.80
7.1.250.0090.00615.85
7.1.240.0100.00315.90
7.1.230.0030.01015.93
7.1.220.0030.00915.61
7.1.210.0140.00015.77
7.1.200.0030.00915.62
7.1.190.0040.00815.46
7.1.180.0120.00315.75
7.1.170.0120.00315.75
7.1.160.0060.00915.89
7.1.150.0070.00715.61
7.1.140.0040.01115.78
7.1.130.0070.00715.86
7.1.120.0000.00915.83
7.1.110.0030.01015.91
7.1.100.0130.00015.98
7.1.90.0140.00315.73
7.1.80.0040.01115.97
7.1.70.0030.00816.59
7.1.60.0080.01117.46
7.1.50.0030.01216.29
7.1.40.0040.00715.59
7.1.30.0040.01115.93
7.1.20.0070.00715.91
7.1.10.0040.00415.86
7.1.00.0030.02918.95
7.0.330.0030.01215.24
7.0.320.0090.00915.44
7.0.310.0030.01015.18
7.0.300.0030.00615.47
7.0.290.0000.01515.10
7.0.280.0130.00015.36
7.0.270.0070.00715.63
7.0.260.0070.00315.05
7.0.250.0000.01215.25
7.0.240.0070.01015.61
7.0.230.0060.00615.49
7.0.220.0040.00815.58
7.0.210.0000.00915.25
7.0.200.0010.00916.18
7.0.190.0040.00815.23
7.0.180.0070.00715.45
7.0.170.0060.00315.57
7.0.160.0100.00315.60
7.0.150.0030.01015.29
7.0.140.0070.03818.84
7.0.130.0000.01715.51
7.0.120.0050.03718.75
7.0.110.0000.01315.34
7.0.100.0030.01015.30
7.0.90.0080.00415.29
7.0.80.0040.00815.43
7.0.70.0060.00615.35
7.0.60.0180.03417.75
7.0.50.0030.02716.81
7.0.40.0050.02415.68
7.0.30.0050.04215.66
7.0.20.0100.03015.53
7.0.10.0030.02415.54
7.0.00.0070.02115.67
5.6.400.0030.00914.52
5.6.390.0000.01314.12
5.6.380.0030.01214.48
5.6.370.0070.00714.22
5.6.360.0000.00914.32
5.6.350.0100.00314.19
5.6.340.0090.00314.24
5.6.330.0040.01113.95
5.6.320.0090.00614.24
5.6.310.0030.01014.24
5.6.300.0060.00314.35
5.6.290.0070.00714.54
5.6.280.0090.03817.66
5.6.270.0040.01114.46
5.6.260.0100.00314.57
5.6.250.0070.00414.28
5.6.240.0090.00614.38
5.6.230.0060.00914.20
5.6.220.0030.00614.42
5.6.210.0090.04217.57
5.6.200.0080.03316.32
5.6.190.0050.03816.22
5.6.180.0100.02316.11
5.6.170.0030.02616.12
5.6.160.0020.02716.12
5.6.150.0070.02016.19
5.6.140.0030.02516.27
5.6.130.0110.02216.42
5.6.120.0030.02316.22
5.6.110.0080.02016.20
5.6.100.0080.02116.36
5.6.90.0050.02216.24
5.6.80.0050.02515.96
5.6.70.0020.02516.02
5.6.60.0050.02315.88
5.6.50.0050.02515.88
5.6.40.0080.02615.87
5.6.30.0070.02415.95
5.6.20.0040.03015.93
5.6.10.0120.03915.92
5.6.00.0080.03715.89
5.5.380.0040.01214.47
5.5.370.0060.00914.19
5.5.360.0030.00914.27
5.5.350.0120.03917.35
5.5.340.0050.02616.14
5.5.330.0040.02716.01
5.5.320.0100.04016.21
5.5.310.0070.02316.19
5.5.300.0050.03016.20
5.5.290.0090.02016.03
5.5.280.0070.02016.20
5.5.270.0070.02016.24
5.5.260.0020.03616.22
5.5.250.0050.02215.96
5.5.240.0030.02215.67
5.5.230.0050.02215.89
5.5.220.0060.01815.82
5.5.210.0070.02315.80
5.5.200.0080.02215.78
5.5.190.0070.02015.72
5.5.180.0050.02315.75
5.5.170.0070.01014.29
5.5.160.0080.03515.77
5.5.150.0000.03115.76
5.5.140.0100.02215.66
5.5.130.0070.02215.70
5.5.120.0090.03715.75
5.5.110.0020.02615.84
5.5.100.0060.04315.75
5.5.90.0070.03815.82
5.5.80.0070.04615.58
5.5.70.0020.02515.72
5.5.60.0020.02615.78
5.5.50.0050.03215.78
5.5.40.0050.02315.59
5.5.30.0030.04615.83
5.5.20.0050.04315.48
5.5.10.0080.03215.73
5.5.00.0070.04015.70
5.4.450.0020.02515.76
5.4.440.0070.02015.59
5.4.430.0030.02315.75
5.4.420.0030.02415.69
5.4.410.0020.02515.65
5.4.400.0050.02015.55
5.4.390.0020.02215.48
5.4.380.0050.02215.48
5.4.370.0020.02415.56
5.4.360.0030.03015.51
5.4.350.0070.04015.59
5.4.340.0020.04615.53
5.4.330.0050.00511.98
5.4.320.0070.02315.54
5.4.310.0050.03815.48
5.4.300.0060.02015.54
5.4.290.0030.02815.55
5.4.280.0050.04015.56
5.4.270.0060.03915.56
5.4.260.0030.02715.47
5.4.250.0030.04115.51
5.4.240.0040.02915.43
5.4.230.0060.02315.53
5.4.220.0060.02115.52
5.4.210.0040.04215.43
5.4.200.0050.02215.53
5.4.190.0050.02015.55
5.4.180.0100.03815.54
5.4.170.0030.04415.54
5.4.160.0120.03715.54
5.4.150.0040.02815.53
5.4.140.0070.03514.16
5.4.130.0020.04214.24
5.4.120.0030.03014.16
5.4.110.0050.03914.19
5.4.100.0100.02514.25
5.4.90.0080.03114.14
5.4.80.0080.03714.14
5.4.70.0070.02514.10
5.4.60.0070.01914.18
5.4.50.0030.04114.23
5.4.40.0050.04214.14
5.4.30.0060.02814.09
5.4.20.0060.03514.14
5.4.10.0030.03814.13
5.4.00.0080.02113.82
5.3.290.0030.04213.28
5.3.280.0040.02213.25
5.3.270.0050.02513.28
5.3.260.0110.03613.28
5.3.250.0030.03913.30
5.3.240.0080.02313.30
5.3.230.0030.03513.25
5.3.220.0050.03013.22
5.3.210.0030.04513.24
5.3.200.0020.04113.30
5.3.190.0050.04013.25
5.3.180.0080.02513.26
5.3.170.0070.03713.29
5.3.160.0020.02513.30
5.3.150.0050.02013.30
5.3.140.0050.02813.23
5.3.130.0100.03013.28
5.3.120.0050.04113.24
5.3.110.0080.04113.23
5.3.100.0070.04213.02
5.3.90.0050.03212.99
5.3.80.0020.02913.01
5.3.70.0040.02113.01
5.3.60.0080.03012.97
5.3.50.0080.01712.95
5.3.40.0050.02012.84
5.3.30.0060.02012.90
5.3.20.0000.02712.82
5.3.10.0030.02212.80
5.3.00.0040.03512.69
5.2.170.0070.04711.26
5.2.160.0000.03311.30
5.2.150.0000.03311.17
5.2.140.0030.03711.24
5.2.130.0030.02711.28
5.2.120.0000.05711.09
5.2.110.0000.03311.16
5.2.100.0030.03011.43
5.2.90.0030.06311.17
5.2.80.0000.03011.05
5.2.70.0100.05711.24
5.2.60.0030.06311.20
5.2.50.0030.04711.18
5.2.40.0030.06011.00
5.2.30.0100.03011.14
5.2.20.0070.06011.13
5.2.10.0000.07011.04
5.2.00.0070.05310.96
5.1.60.0070.03010.01
5.1.50.0030.05310.05
5.1.40.0000.06310.03
5.1.30.0030.03710.46
5.1.20.0100.03010.48
5.1.10.0000.04710.25
5.1.00.0000.06010.21
5.0.50.0030.0238.72
5.0.40.0030.0338.72
5.0.30.0070.0608.72
5.0.20.0030.0438.72
5.0.10.0030.0378.72
5.0.00.0130.0538.72
4.4.90.0030.0338.72
4.4.80.0030.0278.72
4.4.70.0100.0278.72
4.4.60.0000.0308.72
4.4.50.0000.0308.72
4.4.40.0000.0308.72
4.4.30.0030.0208.72
4.4.20.0070.0338.72
4.4.10.0030.0178.72
4.4.00.0030.0538.72
4.3.110.0030.0208.72
4.3.100.0030.0338.72
4.3.90.0070.0178.72
4.3.80.0000.0408.72
4.3.70.0000.0378.72
4.3.60.0030.0308.72
4.3.50.0070.0178.72
4.3.40.0070.0438.72
4.3.30.0030.0338.72
4.3.20.0000.0308.72
4.3.10.0000.0378.72
4.3.00.0030.0338.72

preferences:
46.73 ms | 401 KiB | 5 Q