3v4l.org

run code in 300+ PHP versions simultaneously
<?php function codePoints($utf8_str){ //入力をUTF-32に変換 $utf32_str=mb_convert_encoding($utf8_str,'UTF-32','UTF-8'); for($i=0;$i<mb_strlen($utf32_str,'UTF-32');++$i) //1文字ずつ16進文字列に変換 $result[]=bin2hex(mb_substr($utf32_str,$i,1,'UTF-32')); return $result; } //mb_internal_encoding('UTF-8'); $string ='aab'; $pattern = '/aaa/'; if(preg_match_all($pattern, $string, $matches, PREG_OFFSET_CAPTURE)) { echo 'test'; } $string ="⏰"; $test = codePoints($string); echo "$test:".print_r($test,true); $pattern = '/23f0|23f3/'; if(preg_match_all($pattern, $test[0], $matches )) { echo 'test2'; }

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.0070.00716.99
8.3.50.0090.00918.24
8.3.40.0090.00620.91
8.3.30.0040.01819.10
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.180.0110.00325.92
8.2.170.0120.00919.34
8.2.160.0030.01322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0070.00319.39
8.2.100.0060.00617.97
8.2.90.0000.00818.19
8.2.80.0040.00418.16
8.2.70.0000.00817.88
8.2.60.0050.00317.75
8.2.50.0050.00317.88
8.2.40.0030.00517.75
8.2.30.0000.00817.93
8.2.20.0040.00418.28
8.2.10.0030.00519.50
8.2.00.0020.00519.33
8.1.280.0150.00025.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0030.00822.01
8.1.230.0060.00620.94
8.1.220.0030.00517.78
8.1.210.0040.00418.90
8.1.200.0000.00817.48
8.1.190.0030.00517.35
8.1.180.0080.00318.10
8.1.170.0000.00817.76
8.1.160.0000.00718.93
8.1.150.0040.00418.92
8.1.140.0040.00417.66
8.1.130.0000.00718.89
8.1.120.0000.00717.72
8.1.110.0090.00017.73
8.1.100.0030.00317.57
8.1.90.0000.00717.69
8.1.80.0100.00017.53
8.1.70.0000.00717.67
8.1.60.0040.00417.87
8.1.50.0000.00817.79
8.1.40.0060.00317.63
8.1.30.0050.00317.77
8.1.20.0060.00317.91
8.1.10.0040.00417.77
8.1.00.0040.00417.60
8.0.300.0040.00420.02
8.0.290.0000.00816.88
8.0.280.0000.00818.25
8.0.270.0030.00317.10
8.0.260.0050.00318.45
8.0.250.0000.00717.25
8.0.240.0000.00717.14
8.0.230.0000.00817.17
8.0.220.0070.00017.18
8.0.210.0000.00717.15
8.0.200.0000.00717.22
8.0.190.0070.00017.27
8.0.180.0050.00217.16
8.0.170.0060.00317.21
8.0.160.0000.00717.17
8.0.150.0040.00417.03
8.0.140.0000.00717.07
8.0.130.0000.00613.63
8.0.120.0040.00416.98
8.0.110.0080.00017.15
8.0.100.0040.00417.05
8.0.90.0060.00317.20
8.0.80.0000.00916.95
8.0.70.0080.00017.24
8.0.60.0000.00817.21
8.0.50.0000.00817.24
8.0.30.0050.00317.23
8.0.20.0030.00617.23
8.0.10.0040.00417.14
8.0.00.0030.00617.06
7.4.330.0000.00515.55
7.4.320.0030.00316.84
7.4.300.0060.00316.78
7.4.290.0000.00816.85
7.4.280.0080.00016.70
7.4.270.0090.00016.84
7.4.260.0000.00713.59
7.4.250.0000.00816.71
7.4.240.0080.00016.82
7.4.230.0040.00416.64
7.4.220.0000.00816.89
7.4.210.0070.00016.54
7.4.200.0000.00716.91
7.4.190.0030.00516.93
7.4.180.0040.00417.02
7.4.160.0080.00017.05
7.4.150.0040.00416.95
7.4.140.0050.00316.64
7.4.130.0000.00816.89
7.4.120.0000.00816.66
7.4.110.0030.00316.78
7.4.100.0050.00316.73
7.4.90.0050.00316.92
7.4.80.0000.00716.56
7.4.70.0060.00316.79
7.4.60.0040.00416.80
7.4.50.0030.00616.57
7.4.40.0000.00816.75
7.4.30.0000.00816.61
7.4.20.0030.00616.77
7.4.10.0080.00016.63
7.4.00.0050.00516.84
7.3.330.0030.00516.73
7.3.320.0000.00613.42
7.3.310.0000.00716.67
7.3.300.0090.00016.54
7.3.290.0040.00416.55
7.3.280.0080.00016.55
7.3.270.0080.00016.45
7.3.260.0040.00416.57
7.3.250.0030.00616.46
7.3.240.0080.00016.45
7.3.230.0040.00416.49
7.3.220.0050.00316.46
7.3.210.0030.00516.45
7.3.200.0080.00016.64
7.3.190.0090.00016.61
7.3.180.0080.00016.50
7.3.170.0060.00316.54
7.3.160.0000.00816.60
7.3.150.0030.00516.45
7.3.140.0000.00916.47
7.3.130.0070.00316.49
7.3.120.0000.00916.64
7.3.110.0030.00716.44
7.3.100.0020.00716.58
7.3.90.0040.00416.93
7.3.80.0030.00516.56
7.3.70.0040.00416.62
7.3.60.0070.00016.62
7.3.50.0040.00416.51
7.3.40.0060.00316.65
7.3.30.0000.00816.51
7.3.20.0000.00918.34
7.3.10.0050.00718.23
7.3.00.0030.00718.34

preferences:
31.47 ms | 400 KiB | 5 Q