3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dostuff() { echo 'mb_check_encoding: '; $st = microtime( true ); $ans = mb_check_encoding( "成都瑞雪精密机械有限公司", '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.4.10.0050.01415.00
7.4.00.0080.01015.36
7.3.130.0110.00615.08
7.3.120.0080.01014.93
7.3.110.0080.00914.97
7.3.100.0060.00914.90
7.3.90.0060.00615.11
7.3.80.0080.00715.03
7.3.70.0070.00614.96
7.3.60.0030.01014.91
7.3.50.0090.00714.94
7.3.40.0020.01214.99
7.3.30.0090.00614.95
7.3.20.0050.00916.93
7.3.10.0050.00816.65
7.3.00.0070.00816.88
7.2.260.0040.01115.16
7.2.250.0050.01415.20
7.2.240.0030.01215.25
7.2.230.0080.00715.11
7.2.220.0040.00915.21
7.2.210.0070.00715.27
7.2.200.0020.01015.04
7.2.190.0050.00715.10
7.2.180.0030.01215.19
7.2.170.0070.00915.06
7.2.160.0040.01015.13
7.2.150.0090.00616.93
7.2.140.0050.01016.90
7.2.130.0070.00716.94
7.2.120.0010.01217.10
7.2.110.0060.01017.08
7.2.100.0040.00917.04
7.2.90.0080.00516.92
7.2.80.0040.01117.02
7.2.70.0060.00816.96
7.2.60.0050.00817.13
7.2.50.0070.00817.17
7.2.40.0080.00817.01
7.2.30.0050.00817.07
7.2.20.0050.01017.09
7.2.10.0090.00316.99
7.2.00.0040.01017.51
7.1.330.0070.01015.98
7.1.320.0040.01015.79
7.1.310.0060.00515.90
7.1.300.0040.01215.95
7.1.290.0050.01015.86
7.1.280.0030.01215.90
7.1.270.0040.01015.85
7.1.260.0080.00915.84
7.1.250.0090.00415.77
7.1.240.0050.00715.64
7.1.230.0080.00715.75
7.1.220.0080.00615.88
7.1.210.0050.00915.90
7.1.200.0070.00815.77
7.1.190.0070.00615.73
7.1.180.0040.00815.86
7.1.170.0050.01015.79
7.1.160.0060.00815.81
7.1.150.0050.00615.81
7.1.140.0050.00815.68
7.1.130.0130.00215.97
7.1.120.0050.00815.95
7.1.110.0030.01215.74
7.1.100.0100.00515.77
7.1.90.0070.00515.98
7.1.80.0030.01015.86
7.1.70.0080.00416.44
7.1.60.0060.00917.22
7.1.50.0050.01116.25
7.1.40.0040.00815.78
7.1.30.0060.00615.90
7.1.20.0030.01015.87
7.1.10.0050.00916.01
7.1.00.0030.03118.11
7.0.330.0040.00715.53
7.0.320.0040.00815.53
7.0.310.0090.00515.64
7.0.300.0080.00615.64
7.0.290.0040.00915.63
7.0.280.0040.01215.64
7.0.270.0090.00315.55
7.0.260.0030.01115.52
7.0.250.0040.00615.68
7.0.240.0040.01015.58
7.0.230.0040.00815.45
7.0.220.0050.00915.53
7.0.210.0050.00915.52
7.0.200.0040.00615.90
7.0.190.0020.00915.56
7.0.180.0060.00615.55
7.0.170.0050.00815.64
7.0.160.0050.00715.46
7.0.150.0100.00515.44
7.0.140.0020.03117.83
7.0.130.0050.00815.69
7.0.120.0090.00615.49
7.0.110.0080.00815.47
7.0.100.0050.00715.52
7.0.90.0060.00915.38
7.0.80.0090.00715.54
7.0.70.0060.00615.81
7.0.60.0040.02017.14
7.0.50.0070.03416.43
7.0.40.0050.03315.78
7.0.30.0140.02515.76
7.0.20.0080.02515.90
7.0.10.0060.03715.80
7.0.00.0070.03215.82
5.6.400.0080.00814.55
5.6.390.0030.00814.62
5.6.380.0080.00714.38
5.6.370.0030.01214.52
5.6.360.0050.00514.22
5.6.350.0040.00714.28
5.6.340.0060.00914.27
5.6.330.0050.00914.41
5.6.320.0090.00214.24
5.6.310.0070.00414.52
5.6.300.0030.01014.42
5.6.290.0070.00914.42
5.6.280.0040.03016.72
5.6.270.0100.00414.34
5.6.260.0060.00814.25
5.6.250.0080.00714.48
5.6.240.0070.00414.39
5.6.230.0050.00814.23
5.6.220.0100.00314.35
5.6.210.0130.02216.53
5.6.200.0070.02415.68
5.6.190.0050.01816.47
5.6.180.0200.02516.43
5.6.170.0140.01816.37
5.6.160.0060.01616.48
5.6.150.0020.03515.68
5.6.140.0050.03015.72
5.6.130.0110.03015.54
5.6.120.0060.01816.71
5.6.110.0020.02216.51
5.6.100.0090.02116.52
5.6.90.0070.02016.75
5.6.80.0100.02016.46
5.6.70.0070.00614.35
5.6.60.0090.00414.10
5.6.50.0020.01214.19
5.6.40.0100.00514.43
5.6.30.0070.00814.20
5.6.20.0060.00614.44
5.6.10.0020.01114.28
5.6.00.0100.00314.15
5.5.380.0050.00814.33
5.5.370.0090.00614.37
5.5.360.0040.01114.21
5.5.350.0080.03416.28
5.5.340.0070.02915.49
5.5.330.0090.01716.35
5.5.320.0180.01616.39
5.5.310.0110.02816.26
5.5.300.0050.02715.49
5.5.290.0040.02515.57
5.5.280.0070.03116.51
5.5.270.0060.01916.48
5.5.260.0090.03116.46
5.5.250.0080.02016.21
5.5.240.0100.02716.28
5.5.230.0060.00814.33
5.5.220.0060.00714.26
5.5.210.0030.00814.20
5.5.200.0080.00714.11
5.5.190.0100.00314.14
5.5.180.0080.00613.97
5.5.170.0060.00614.08
5.5.160.0030.01114.03
5.5.150.0040.00814.22
5.5.140.0050.00814.13
5.5.130.0070.00614.26
5.5.120.0070.00714.34
5.5.110.0030.00814.25
5.5.100.0080.00614.29
5.5.90.0040.01114.28
5.5.80.0030.01014.25
5.5.70.0030.00914.09
5.5.60.0020.01214.20
5.5.50.0000.01214.14
5.5.40.0100.00314.18
5.5.30.0090.00514.13
5.5.20.0030.01014.29
5.5.10.0020.01214.14
5.5.00.0090.00614.05
5.4.450.0130.01814.04
5.4.440.0290.02114.09
5.4.430.0080.02513.96
5.4.420.0090.02214.01
5.4.410.0080.02213.99
5.4.400.0090.02313.93
5.4.390.0120.02213.83
5.4.380.0050.02413.67
5.4.370.0070.02213.69
5.4.360.0080.02113.74
5.4.350.0080.02413.76
5.4.340.0070.02313.59
5.4.330.0030.00711.15
5.4.320.0020.01911.64
5.4.310.0050.01711.68
5.4.300.0040.01611.71
5.4.290.0050.01811.55
5.4.280.0050.01711.62
5.4.270.0060.01611.56
5.4.260.0050.01711.58
5.4.250.0040.01811.65
5.4.240.0040.01811.60
5.4.230.0070.01411.67
5.4.220.0030.01911.64
5.4.210.0030.02111.53
5.4.200.0040.01811.65
5.4.190.0050.01611.51
5.4.180.0040.01611.61
5.4.170.0060.01611.59
5.4.160.0060.01711.59
5.4.150.0070.01811.60
5.4.140.0060.02111.50
5.4.130.0040.01911.41
5.4.120.0010.02011.51
5.4.110.0030.02011.43
5.4.100.0050.01711.41
5.4.90.0060.01711.51
5.4.80.0030.02211.50
5.4.70.0040.02211.48
5.4.60.0040.01911.49
5.4.50.0070.02111.57
5.4.40.0040.02011.51
5.4.30.0060.01811.40
5.4.20.0060.01711.52
5.4.10.0070.01611.43
5.4.00.0080.01511.33
5.3.290.0100.04712.80
5.3.280.0130.04412.71
5.3.270.0080.03912.72
5.3.260.0120.04012.72
5.3.250.0080.04912.72
5.3.240.0090.05312.72
5.3.230.0070.05012.70
5.3.220.0110.04612.68
5.3.210.0060.05412.68
5.3.200.0080.05112.68
5.3.190.0080.04512.68
5.3.180.0110.03912.67
5.3.170.0070.04112.67
5.3.160.0110.03612.67
5.3.150.0110.03812.67
5.3.140.0080.04012.66
5.3.130.0120.03712.66
5.3.120.0110.03712.65
5.3.110.0090.04612.66
5.3.100.0100.04712.12
5.3.90.0090.04612.10
5.3.80.0080.03712.09
5.3.70.0080.03612.09
5.3.60.0040.04312.07
5.3.50.0070.03612.02
5.3.40.0080.04512.02
5.3.30.0080.05111.98
5.3.20.0100.03811.77
5.3.10.0080.04911.73
5.3.00.0070.03911.72
5.2.170.0070.0309.21
5.2.160.0080.0349.22
5.2.150.0050.0389.22
5.2.140.0080.0309.21
5.2.130.0060.0309.18
5.2.120.0070.0349.17
5.2.110.0080.0389.18
5.2.100.0070.0329.18
5.2.90.0070.0329.18
5.2.80.0020.0339.18
5.2.70.0050.0329.18
5.2.60.0050.0359.14
5.2.50.0080.0299.10
5.2.40.0050.0289.09
5.2.30.0060.0299.07
5.2.20.0060.0289.05
5.2.10.0060.0308.97
5.2.00.0040.0338.82
5.1.60.0050.0278.11
5.1.50.0040.0278.10
5.1.40.0060.0248.08
5.1.30.0040.0318.43
5.1.20.0050.0308.43
5.1.10.0020.0288.16
5.1.00.0050.0258.16
5.0.50.0040.0236.64
5.0.40.0050.0216.50
5.0.30.0060.0346.32
5.0.20.0050.0216.28
5.0.10.0020.0236.26
5.0.00.0050.0296.25
4.4.90.0040.0144.78
4.4.80.0050.0134.75
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0020.0164.77
4.4.40.0010.0274.71
4.4.30.0030.0224.76
4.4.20.0060.0194.85
4.4.10.0070.0184.85
4.4.00.0020.0264.76
4.3.110.0050.0144.66
4.3.100.0020.0164.67
4.3.90.0030.0144.64
4.3.80.0010.0264.58
4.3.70.0020.0154.63
4.3.60.0030.0154.63
4.3.50.0040.0254.63
4.3.40.0100.0504.54
4.3.30.0020.0223.32
4.3.20.0020.0233.30
4.3.10.0040.0203.26
4.3.00.0030.01714.28

preferences:
43.11 ms | 401 KiB | 5 Q