3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_emojis(string $string) { static $emojis; if(!isset($emojis)) { $emojis = [ 'bbb' => json_decode(json_encode("\u{1F6A3}")), ]; } $tok = strtok($string, ":"); while($tok !== false) { if(isset($emojis[$tok])) { yield $emojis[$tok]; } else { yield $tok; } $tok = strtok(":"); } } foreach(parse_emojis('ok :bbb: bbl') as $part) { print "$part"; }

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.0150.00616.50
8.3.50.0130.00616.62
8.3.40.0090.00918.84
8.3.30.0110.00418.75
8.3.20.0040.00420.33
8.3.10.0000.00723.49
8.3.00.0040.00423.64
8.2.180.0090.00918.52
8.2.170.0070.01018.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00022.08
8.2.120.0040.00426.35
8.2.110.0070.00320.38
8.2.100.0080.00419.82
8.2.90.0040.00418.28
8.2.80.0080.00017.97
8.2.70.0040.00418.05
8.2.60.0040.00418.09
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0050.00519.19
8.2.20.0040.00418.18
8.2.10.0040.00418.17
8.2.00.0040.00418.16
8.1.280.0090.00625.92
8.1.270.0040.00424.02
8.1.260.0070.00026.35
8.1.250.0030.00328.09
8.1.240.0110.00322.32
8.1.230.0040.00720.91
8.1.220.0000.00717.74
8.1.210.0030.00518.78
8.1.200.0030.00617.35
8.1.190.0050.00317.35
8.1.180.0000.00918.10
8.1.170.0000.00818.79
8.1.160.0000.00718.81
8.1.150.0040.00420.80
8.1.140.0050.00217.75
8.1.130.0040.00417.51
8.1.120.0030.00317.46
8.1.110.0040.00417.44
8.1.100.0000.00717.50
8.1.90.0000.00717.42
8.1.80.0000.00717.35
8.1.70.0050.00217.46
8.1.60.0000.00817.47
8.1.50.0000.00717.53
8.1.40.0040.00417.56
8.1.30.0040.00417.52
8.1.20.0080.00017.54
8.1.10.0000.00817.54
8.1.00.0030.00517.47
8.0.300.0040.00419.77
8.0.290.0040.00416.75
8.0.280.0040.00418.36
8.0.270.0030.00317.32
8.0.260.0060.00016.81
8.0.250.0000.00716.96
8.0.240.0040.00416.93
8.0.230.0050.00216.96
8.0.220.0070.00016.89
8.0.210.0070.00016.80
8.0.200.0000.00716.97
8.0.190.0040.00416.82
8.0.180.0040.00416.96
8.0.170.0070.00016.88
8.0.160.0080.00016.86
8.0.150.0040.00416.72
8.0.140.0080.00016.76
8.0.130.0030.00313.35
8.0.120.0030.00616.79
8.0.110.0050.00316.89
8.0.100.0000.00716.84
8.0.90.0000.00816.75
8.0.80.0120.00316.90
8.0.70.0030.00516.76
8.0.60.0080.00016.76
8.0.50.0040.00416.93
8.0.30.0110.00816.95
8.0.20.0100.01017.40
8.0.10.0040.00416.88
8.0.00.0060.01116.66
7.4.330.0000.00416.84
7.4.320.0030.00316.42
7.4.300.0060.00016.49
7.4.290.0070.00016.41
7.4.280.0080.00016.51
7.4.270.0030.00816.52
7.4.260.0030.00316.37
7.4.250.0040.00416.55
7.4.240.0040.00416.49
7.4.230.0040.00416.61
7.4.220.0130.01016.53
7.4.210.0110.00616.60
7.4.200.0000.00716.54
7.4.160.0140.00416.67
7.4.150.0140.00617.40
7.4.140.0100.00817.86
7.4.130.0110.00716.46
7.4.120.0110.01016.58
7.4.110.0100.00716.42
7.4.100.0100.00716.43
7.4.90.0070.01316.62
7.4.80.0070.01019.39
7.4.70.0190.00016.58
7.4.60.0120.00316.64
7.4.50.0000.01516.45
7.4.40.0130.00316.39
7.4.30.0070.01716.45
7.4.00.0140.00414.89
7.3.330.0030.00313.34
7.3.320.0030.00313.37
7.3.310.0000.00616.31
7.3.300.0070.00016.39
7.3.290.0080.00716.35
7.3.280.0090.00916.35
7.3.270.0070.01017.40
7.3.260.0100.01016.38
7.3.250.0140.00716.45
7.3.240.0110.01016.47
7.3.230.0110.00616.55
7.3.210.0100.01016.60
7.3.200.0080.00816.29
7.3.190.0110.00616.68
7.3.180.0050.01016.34
7.3.170.0120.00416.31
7.3.160.0110.00616.38
7.2.330.0040.01416.41
7.2.320.0110.00616.70
7.2.310.0140.01016.51
7.2.300.0120.01316.70
7.2.290.0070.01316.66
7.2.60.0100.00317.14
7.1.200.0080.00315.59
7.1.110.0120.00816.44
7.1.100.0130.00916.27
7.1.90.0110.01116.08
7.1.80.0200.00316.25
7.1.70.0120.01215.35
7.1.60.0300.01832.98
7.1.50.0450.00733.11
7.1.40.0400.01232.40
7.1.30.0410.01632.59
7.1.20.0380.01432.68
7.1.10.0170.01414.69
7.1.00.0130.01314.79
7.0.250.0160.00515.98
7.0.240.0080.01315.69
7.0.230.0220.00815.66
7.0.220.0060.01916.04
7.0.210.0220.00914.96
7.0.200.0210.00714.73
7.0.190.0160.01015.02
7.0.180.0200.01014.38
7.0.170.0120.01914.40
7.0.160.0250.00714.25
7.0.150.0200.01114.60
7.0.140.0180.00714.78
7.0.130.0240.00714.78
7.0.120.0120.00814.70
7.0.110.0170.01414.55
7.0.100.0270.00414.43
7.0.90.0150.01014.50
7.0.80.0120.01214.55
7.0.70.0160.00814.58
7.0.60.0450.00314.50
7.0.50.0230.00714.48
7.0.40.0690.00314.79
7.0.30.0190.00614.78
7.0.20.0200.00414.48
7.0.10.0140.00714.32
7.0.00.0160.00614.56

preferences:
34.61 ms | 400 KiB | 5 Q