3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dostuff() { echo 'mb_check_encoding: '; $st = microtime( true ); $ans = mb_check_encoding( "\xF4\x90\x80\x80", 'UTF-8' ); $et = microtime( true ); echo $et - $st, 's '; var_dump( $ans ); echo 'preg_match: '; $st = microtime( true ); $ans = preg_match( '//u', "\xF4\x90\x80\x80" ); $et = microtime( true ); echo $et - $st, 's '; var_dump( $ans ); } dostuff();

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.2.00.0060.00619.49
7.1.70.0000.01017.42
7.1.60.0140.01019.40
7.1.50.0200.02416.97
7.1.00.0030.07322.46
7.0.200.0000.00716.83
7.0.140.0030.07722.18
7.0.60.0030.07021.82
7.0.50.0030.07022.20
7.0.40.0070.07319.96
7.0.30.0070.08320.10
7.0.20.0070.08320.15
7.0.10.0070.07720.03
7.0.00.0000.04320.18
5.6.280.0030.07321.09
5.6.210.0030.07720.67
5.6.200.0100.08021.01
5.6.190.0030.08720.99
5.6.180.0100.07321.04
5.6.170.0070.08321.10
5.6.160.0070.08020.95
5.6.150.0000.09020.98
5.6.140.0030.08020.98
5.6.130.0030.06321.14
5.6.120.0000.08020.96
5.6.110.0070.08021.14
5.6.100.0000.08721.13
5.6.90.0030.07721.12
5.6.80.0000.06320.41
5.6.70.0030.08020.38
5.6.60.0070.07020.38
5.6.50.0070.08020.38
5.6.40.0000.08720.38
5.6.30.0070.06720.50
5.6.20.0070.07320.48
5.6.10.0030.07320.32
5.6.00.0000.08720.48
5.5.350.0000.06020.53
5.5.340.0000.08720.98
5.5.330.0000.08720.91
5.5.320.0130.07720.78
5.5.310.0030.07720.97
5.5.300.0070.07720.77
5.5.290.0030.06020.80
5.5.280.0070.07320.87
5.5.270.0100.07320.87
5.5.260.0070.08020.87
5.5.250.0030.08020.58
5.5.240.0100.08020.16
5.5.230.0070.07720.18
5.5.220.0000.04720.14
5.5.210.0000.05320.03
5.5.200.0070.07320.15
5.5.190.0030.07720.25
5.5.180.0000.08320.24
5.5.160.0130.07020.23
5.5.150.0130.06320.13
5.5.140.0000.06320.12
5.5.130.0070.08020.12
5.5.120.0030.06720.23
5.5.110.0070.07720.08
5.5.100.0100.07320.08
5.5.90.0000.04020.04
5.5.80.0070.03320.11
5.5.70.0000.04019.96
5.5.60.0000.04019.89
5.5.50.0070.03020.13
5.5.40.0000.03720.03
5.5.30.0000.03020.11
5.5.20.0000.04020.03
5.5.10.0000.04320.06
5.5.00.0000.03319.90
5.4.450.0070.08019.34
5.4.440.0070.07719.44
5.4.430.0100.07719.33
5.4.420.0030.08719.38
5.4.410.0100.06319.26
5.4.400.0030.06319.08
5.4.390.0070.06019.01
5.4.380.0000.07719.19
5.4.370.0030.07719.04
5.4.360.0100.06719.07
5.4.350.0000.07719.16
5.4.340.0000.07719.02
5.4.320.0030.04019.22
5.4.310.0030.06019.07
5.4.300.0130.06318.92
5.4.290.0000.07318.93
5.4.280.0030.05319.05
5.4.270.0070.06719.04
5.4.260.0070.07019.22
5.4.250.0070.05319.21
5.4.240.0000.03719.07
5.4.230.0000.04318.90
5.4.220.0030.03719.07
5.4.210.0030.03318.93
5.4.200.0000.03719.03
5.4.190.0070.03019.04
5.4.180.0000.03719.05
5.4.170.0000.03719.19
5.4.160.0030.04019.18
5.4.150.0000.03719.03
5.4.140.0000.03016.42
5.4.130.0000.03016.24
5.4.120.0000.04016.41
5.4.110.0030.02716.31
5.4.100.0000.03016.42
5.4.90.0000.03016.47
5.4.80.0000.03016.47
5.4.70.0000.03016.36
5.4.60.0030.02716.45
5.4.50.0030.02716.45
5.4.40.0030.02716.45
5.4.30.0000.02716.47
5.4.20.0000.04016.35
5.4.10.0030.03316.34
5.4.00.0000.03315.91
5.3.290.0070.07014.66
5.3.280.0000.03714.59
5.3.270.0000.04314.66
5.3.260.0030.03014.64
5.3.250.0000.03014.65
5.3.240.0000.03014.57
5.3.230.0000.03014.55
5.3.220.0000.03014.61
5.3.210.0000.03014.57
5.3.200.0000.03314.68
5.3.190.0030.02714.48
5.3.180.0030.03014.61
5.3.170.0000.03014.57
5.3.160.0030.02714.42
5.3.150.0030.02714.58
5.3.140.0000.03014.62
5.3.130.0030.03014.63
5.3.120.0000.04314.50
5.3.110.0000.03014.64
5.3.100.0030.07714.09
5.3.90.0000.08014.11
5.3.80.0070.06014.11
5.3.70.0130.06014.09
5.3.60.0000.07314.05
5.3.50.0000.07714.06
5.3.40.0070.07313.99
5.3.30.0070.07013.92
5.3.20.0000.06713.70
5.3.10.0070.06713.67
5.3.00.0000.07713.63
5.2.170.0000.06011.04
5.2.160.0030.06311.04
5.2.150.0030.06311.16
5.2.140.0000.05711.18
5.2.130.0070.05711.20
5.2.120.0030.06310.99
5.2.110.0000.06711.16
5.2.100.0000.06311.09
5.2.90.0070.06011.08
5.2.80.0000.06311.14
5.2.70.0000.06011.15
5.2.60.0100.05711.02
5.2.50.0100.05311.07
5.2.40.0030.05310.89
5.2.30.0030.06011.04
5.2.20.0000.06310.98
5.2.10.0070.06010.67
5.2.00.0030.06010.62
5.1.60.0000.05310.09
5.1.50.0070.04310.08
5.1.40.0070.05310.04
5.1.30.0030.06010.26
5.1.20.0030.05710.20
5.1.10.0100.05010.13
5.1.00.0000.0509.95
5.0.50.0000.0509.29
5.0.40.0030.0439.29
5.0.30.0070.0609.29
5.0.20.0030.0439.29
5.0.10.0000.0479.29
5.0.00.0000.0679.29
4.4.90.0000.0379.29
4.4.80.0000.0379.29
4.4.70.0000.0379.29
4.4.60.0000.0339.29
4.4.50.0030.0339.29
4.4.40.0070.0509.29
4.4.30.0000.0279.29
4.4.20.0030.0279.29
4.4.10.0000.0379.29
4.4.00.0000.0579.29
4.3.110.0000.0379.29
4.3.100.0000.0379.29
4.3.90.0000.0379.29
4.3.80.0000.0479.29
4.3.70.0000.0379.29
4.3.60.0000.0339.29
4.3.50.0030.0479.29
4.3.40.0100.0479.29
4.3.30.0030.0379.29
4.3.20.0000.0379.29
4.3.10.0000.0309.29
4.3.00.0000.0339.29

preferences:
37.2 ms | 400 KiB | 5 Q