3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_emojis(string $string): string { preg_match_all('/(?<match>:.*:)/', $string, $matches, PREG_PATTERN_ORDER); $emojis = $matches['match']; foreach ($emojis as $emoji): $emoji_name = trim($emoji, ':'); foreach (EMOJIS as $key => $value): $names = $value[3]; foreach($names as $name): if ($name == $emoji_name): $string = str_replace($emoji, sprintf('\\u{%s}', $key), $string); break; endif; endforeach; endforeach; endforeach; console_log('$string', $string); return $string; }

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.70.0100.00716.75
8.3.60.0090.00916.63
8.3.50.0130.01016.21
8.3.40.0120.00318.71
8.3.30.0110.00418.67
8.3.20.0110.00420.23
8.3.10.0080.00023.48
8.3.00.0040.00423.66
8.2.180.0180.00016.32
8.2.170.0040.01122.96
8.2.160.0100.00320.52
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0030.00626.16
8.2.120.0000.00818.68
8.2.110.0030.00621.18
8.2.100.0000.01117.59
8.2.90.0060.00319.00
8.2.80.0000.00917.97
8.2.70.0080.00017.50
8.2.60.0040.00417.91
8.2.50.0000.01119.75
8.2.40.0070.00020.47
8.2.30.0060.00319.15
8.2.20.0020.00517.99
8.2.10.0080.00017.93
8.2.00.0040.00418.01
8.1.280.0060.00825.92
8.1.270.0040.00423.96
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0030.00619.47
8.1.230.0070.00317.77
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0000.00817.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0040.00418.49
8.1.160.0000.00718.60
8.1.150.0040.00420.46
8.1.140.0080.00017.48
8.1.130.0000.00718.80
8.1.120.0070.00017.32
8.1.110.0000.00817.21
8.1.100.0030.00517.33
8.1.90.0000.00817.25
8.1.80.0070.00017.33
8.1.70.0030.00317.36
8.1.60.0040.00417.42
8.1.50.0040.00717.36
8.1.40.0000.00717.43
8.1.30.0000.00717.55
8.1.20.0040.00417.47
8.1.10.0030.00617.38
8.1.00.0000.00817.36
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0070.00018.38
8.0.270.0050.00217.19
8.0.260.0000.00816.69
8.0.250.0040.00416.74
8.0.240.0060.00316.89
8.0.230.0040.00416.81
8.0.220.0000.00816.65
8.0.210.0000.00716.63
8.0.200.0030.00316.79
8.0.190.0000.00816.70
8.0.180.0050.00316.67
8.0.170.0050.00216.82
8.0.160.0040.00416.83
8.0.150.0040.00416.59
8.0.140.0070.00816.73
8.0.130.0060.00013.27
8.0.120.0000.00816.66
8.0.110.0040.00416.59
8.0.100.0000.00716.63
8.0.90.0070.00016.64
8.0.80.0000.01516.80
8.0.70.0040.00416.67
8.0.60.0000.00716.83
8.0.50.0030.00516.61
8.0.30.0150.00216.79
8.0.20.0120.01017.40
8.0.10.0070.00016.93
8.0.00.0070.01016.74
7.4.330.0050.00016.67
7.4.320.0030.00316.37
7.4.300.0000.00616.48
7.4.290.0070.00016.46
7.4.280.0050.00316.36
7.4.270.0030.00616.30
7.4.260.0070.00016.40
7.4.250.0070.00016.32
7.4.240.0050.00216.37
7.4.230.0020.00516.21
7.4.220.0130.00516.39
7.4.210.0100.01016.43
7.4.200.0040.00416.35
7.4.160.0100.00516.33
7.4.150.0070.01517.40
7.4.140.0110.00817.86
7.4.130.0070.01116.31
7.4.120.0100.00916.37
7.4.110.0160.00616.19
7.4.100.0070.01016.30
7.4.90.0160.00816.31
7.4.80.0090.00919.39
7.4.70.0150.00616.34
7.4.60.0030.01316.18
7.4.50.0120.00316.49
7.4.40.0130.00416.18
7.4.30.0060.01016.40
7.4.00.0090.00714.59
7.3.330.0060.00012.98
7.3.320.0000.00613.08
7.3.310.0040.00416.17
7.3.300.0000.00716.04
7.3.290.0040.01116.21
7.3.280.0070.01016.14
7.3.270.0140.00317.40
7.3.260.0110.00616.34
7.3.250.0120.00616.31
7.3.240.0070.01216.22
7.3.230.0140.00316.52
7.3.210.0030.01316.30
7.3.200.0060.01616.53
7.3.190.0070.01016.12
7.3.180.0060.00916.13
7.3.170.0070.01016.37
7.3.160.0060.00916.12
7.3.120.0110.00714.73
7.3.110.0080.01014.83
7.3.100.0040.01114.82
7.3.90.0040.00714.79
7.3.80.0060.00614.56
7.3.70.0040.00414.44
7.3.60.0030.00714.44
7.3.50.0040.01114.70
7.3.40.0060.00614.52
7.3.30.0000.01314.33
7.3.20.0110.00316.28
7.3.10.0070.00716.51
7.3.00.0050.00716.46
7.2.330.0110.00616.52
7.2.320.0150.00616.25
7.2.310.0130.00316.29
7.2.300.0130.00616.34
7.2.290.0060.01316.54
7.2.250.0030.01514.84
7.2.240.0070.01114.80
7.2.230.0090.00614.68
7.2.220.0030.00914.92
7.2.210.0030.00714.77
7.2.200.0030.01014.94
7.2.190.0000.01014.91
7.2.180.0000.00914.91
7.2.170.0060.00314.73
7.2.130.0070.01116.73
7.2.120.0000.01416.84
7.2.110.0060.00916.56
7.2.100.0120.00316.77
7.2.90.0040.01116.67
7.2.80.0060.00916.84
7.2.70.0030.01016.54
7.2.60.0050.00816.73
7.2.50.0090.00916.80
7.2.40.0110.00316.57
7.2.30.0100.00016.69
7.2.20.0070.00716.65
7.2.10.0000.01416.50
7.2.00.0090.00616.51
7.1.330.0040.00815.71
7.1.320.0080.00315.77
7.1.310.0070.00715.71
7.1.300.0110.00315.61
7.1.290.0000.01115.60
7.1.280.0040.01115.55
7.1.270.0030.01015.57
7.1.260.0060.00915.38
7.1.250.0070.00715.71
7.1.200.0000.01115.27
7.1.110.0110.00816.17
7.1.100.0080.00617.93
7.1.90.0280.00316.43
7.1.80.0100.00717.52
7.1.70.0000.01316.84
7.1.60.0130.01335.07
7.1.50.0240.00634.80
7.1.40.0170.00934.17
7.1.30.0260.01034.55
7.1.20.0290.01334.43
7.1.10.0100.00316.34
7.1.00.0100.00316.36
7.0.250.0110.00815.67
7.0.240.0060.00917.69
7.0.230.0160.01316.00
7.0.220.0040.01117.54
7.0.210.0040.01116.59
7.0.200.0120.00016.34
7.0.190.0030.01316.42
7.0.180.0030.01016.02
7.0.170.0000.01515.96
7.0.160.0030.01615.99
7.0.150.0060.00615.97
7.0.140.0060.00816.19
7.0.130.0000.01616.36
7.0.120.0060.01016.21
7.0.110.0000.01516.30
7.0.100.0060.00916.05
7.0.90.0030.01015.87
7.0.80.0060.00616.07
7.0.70.0080.00416.04
7.0.60.0000.01215.96
7.0.50.0030.00916.12
7.0.40.0030.00916.38
7.0.30.0000.01216.48
7.0.20.0090.00416.14
7.0.10.0000.01316.30
7.0.00.0000.01716.17

preferences:
49.68 ms | 401 KiB | 5 Q