3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Showing results [program=for {program} programs|No pogram at all] [province=in {province}] [degree=with degree of {degree}]'; function interpolateString($message, array $context = array()) { $replace = array(); foreach ($context as $key => $val) { $replace['{' . $key . '}'] = $val; } return strtr($message, $replace); } $arrContext = array( 'program' => 'Nursing', 'province' => 'Ontario', 'degree' => '0' ); echo interpolateString($str, $arrContext);

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.0070.00716.63
8.3.60.0150.00418.31
8.3.50.0100.01022.05
8.3.40.0140.00718.83
8.3.30.0110.00418.67
8.3.20.0080.00018.82
8.3.10.0080.00021.11
8.3.00.0080.00021.96
8.2.180.0110.00718.43
8.2.170.0090.00622.96
8.2.160.0100.00320.23
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00819.79
8.2.110.0060.00322.08
8.2.100.0080.00417.60
8.2.90.0000.00819.40
8.2.80.0090.00018.16
8.2.70.0040.00417.75
8.2.60.0040.00418.03
8.2.50.0030.00618.07
8.2.40.0040.00418.19
8.2.30.0060.00319.87
8.2.20.0020.00517.71
8.2.10.0030.00517.68
8.2.00.0040.00717.80
8.1.280.0100.00725.92
8.1.270.0000.00823.99
8.1.260.0090.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00322.60
8.1.230.0080.00321.04
8.1.220.0030.00618.77
8.1.210.0080.00019.03
8.1.200.0060.00317.35
8.1.190.0040.00417.52
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0070.00018.81
8.1.150.0070.00018.55
8.1.140.0060.00317.38
8.1.130.0030.00317.75
8.1.120.0040.00417.50
8.1.110.0030.00517.50
8.1.100.0000.00717.48
8.1.90.0000.00717.36
8.1.80.0060.00317.41
8.1.70.0030.00317.46
8.1.60.0040.00417.58
8.1.50.0000.00817.40
8.1.40.0050.00217.54
8.1.30.0040.00417.58
8.1.20.0060.00317.57
8.1.10.0040.00417.51
8.1.00.0080.00017.38
8.0.300.0080.00019.95
8.0.290.0040.00416.75
8.0.280.0040.00418.45
8.0.270.0030.00317.20
8.0.260.0000.00816.82
8.0.250.0000.00816.90
8.0.240.0000.01016.98
8.0.230.0000.00616.94
8.0.220.0030.00316.86
8.0.210.0070.00016.91
8.0.200.0000.00716.85
8.0.190.0040.00417.00
8.0.180.0000.00816.93
8.0.170.0040.00416.97
8.0.160.0000.00716.92
8.0.150.0080.00016.85
8.0.140.0000.00716.80
8.0.130.0070.00013.31
8.0.120.0050.00316.83
8.0.110.0000.00716.91
8.0.100.0000.00816.78
8.0.90.0040.00416.93
8.0.80.0070.01416.84
8.0.70.0040.00416.86
8.0.60.0000.00816.83
8.0.50.0040.00416.86
8.0.30.0060.01217.17
8.0.20.0130.00517.40
8.0.10.0040.00417.06
8.0.00.0090.01116.68
7.4.330.0050.00014.72
7.4.320.0000.00616.52
7.4.300.0030.00316.52
7.4.290.0030.00316.56
7.4.280.0000.00816.40
7.4.270.0000.00816.64
7.4.260.0000.00513.24
7.4.250.0030.00516.49
7.4.240.0070.00016.66
7.4.230.0000.00716.59
7.4.220.0100.01616.56
7.4.210.0080.00916.61
7.4.200.0070.00016.68
7.4.190.0050.00216.69
7.4.160.0040.01116.32
7.4.150.0060.01517.40
7.4.140.0120.00817.86
7.4.130.0110.00616.43
7.4.120.0130.00816.48
7.4.110.0040.01416.41
7.4.100.0100.00716.50
7.4.90.0220.00016.38
7.4.80.0120.01219.37
7.4.70.0070.01016.48
7.4.60.0090.00616.46
7.4.50.0000.00916.34
7.4.40.0070.00322.52
7.4.30.0100.00616.33
7.4.00.0040.01215.07
7.3.330.0000.00513.34
7.3.320.0000.00713.34
7.3.310.0000.00716.37
7.3.300.0050.00216.26
7.3.290.0060.00916.28
7.3.280.0060.01116.36
7.3.270.0070.01017.40
7.3.260.0170.00718.24
7.3.250.0080.01316.60
7.3.240.0110.00616.70
7.3.230.0120.00416.66
7.3.210.0060.01016.37
7.3.200.0080.00819.39
7.3.190.0120.00316.74
7.3.180.0150.00616.55
7.3.170.0030.01316.59
7.3.160.0000.01616.39
7.3.120.0090.00614.62
7.3.10.0060.00616.81
7.3.00.0100.00316.62
7.2.330.0090.00916.71
7.2.320.0030.01416.67
7.2.310.0060.01816.80
7.2.300.0130.00316.39
7.2.290.0060.01216.79
7.2.130.0070.00716.71
7.2.120.0060.00616.84
7.2.110.0080.00416.87
7.2.100.0100.00317.00
7.2.90.0060.00916.91
7.2.80.0070.00717.07
7.2.70.0070.01016.89
7.2.60.0060.00616.75
7.2.50.0100.00316.50
7.2.40.0000.01316.89
7.2.30.0060.00316.88
7.2.20.0030.01316.90
7.2.10.0030.00716.86
7.2.00.0050.01118.20
7.1.250.0000.01015.54
7.1.100.0000.01818.31
7.1.70.0000.00917.34
7.1.60.0100.01319.40
7.1.50.0100.01016.98
7.1.00.0100.03022.43
7.0.200.0030.00916.94
7.0.140.0030.06322.15
7.0.60.0030.05021.83
7.0.50.0200.06722.04
7.0.40.0030.08320.04
7.0.30.0000.06720.19
7.0.20.0070.05320.11
7.0.10.0100.06320.02
7.0.00.0030.08320.18
5.6.280.0070.07320.87
5.6.210.0170.07020.73
5.6.200.0030.08720.98
5.6.190.0070.07721.15
5.6.180.0030.08021.03
5.6.170.0070.08321.13
5.6.160.0170.07021.13
5.6.150.0070.07721.03
5.6.140.0070.07721.12
5.6.130.0030.08321.00
5.6.120.0070.05320.99
5.6.110.0100.08021.04
5.6.100.0130.07720.99
5.6.90.0000.09021.11
5.6.80.0030.05020.48
5.6.70.0100.07320.42
5.6.60.0070.07320.32
5.6.50.0100.06020.42
5.6.40.0000.06720.37
5.6.30.0030.08020.38
5.6.20.0030.07020.26
5.6.10.0000.08320.34
5.6.00.0030.07320.34
5.5.350.0070.05020.44
5.5.340.0030.05720.70
5.5.330.0130.06020.89
5.5.320.0100.08020.79
5.5.310.0100.07320.69
5.5.300.0030.07020.75
5.5.290.0070.07020.77
5.5.280.0070.08320.81
5.5.270.0030.06320.87
5.5.260.0100.07720.68
5.5.250.0000.06320.71
5.5.240.0100.06320.16
5.5.230.0000.07320.26
5.5.220.0200.06720.37
5.5.210.0070.07720.15
5.5.200.0130.07320.13
5.5.190.0100.06720.23
5.5.180.0030.05320.01
5.5.160.0100.05320.17
5.5.150.0070.07020.22
5.5.140.0030.08020.32
5.5.130.0000.08020.21
5.5.120.0070.06020.16
5.5.110.0100.07020.23
5.5.100.0000.08020.23
5.5.90.0030.07720.02
5.5.80.0100.05719.99
5.5.70.0100.06020.02
5.5.60.0030.07720.20
5.5.50.0070.08020.16
5.5.40.0000.08320.19
5.5.30.0030.07320.02
5.5.20.0070.06320.21
5.5.10.0070.07020.00
5.5.00.0100.06720.05
5.4.450.0070.08019.23
5.4.440.0000.08719.22
5.4.430.0070.07719.39
5.4.420.0030.08019.17
5.4.410.0070.07319.33
5.4.400.0030.08019.07
5.4.390.0070.04319.17
5.4.380.0030.06719.04
5.4.370.0030.06718.92
5.4.360.0100.07319.16
5.4.350.0070.07019.05
5.4.340.0000.07719.17
5.4.320.0130.07019.07
5.4.310.0070.06719.21
5.4.300.0070.08018.90
5.4.290.0030.07719.07
5.4.280.0070.07719.16
5.4.270.0100.07019.01
5.4.260.0030.07319.01
5.4.250.0070.06719.09
5.4.240.0000.08019.21
5.4.230.0100.07319.06
5.4.220.0070.06319.03
5.4.210.0030.07019.16
5.4.200.0000.07718.99
5.4.190.0000.06318.90
5.4.180.0030.07319.19
5.4.170.0030.07319.15
5.4.160.0070.06719.18
5.4.150.0070.07319.05
5.4.140.0070.07016.32
5.4.130.0000.06716.39
5.4.120.0070.06716.37
5.4.110.0000.07716.46
5.4.100.0100.07016.47
5.4.90.0000.07716.40
5.4.80.0030.07316.46
5.4.70.0100.06716.30
5.4.60.0070.07016.30
5.4.50.0100.07316.48
5.4.40.0070.05016.37
5.4.30.0030.05316.45
5.4.20.0000.05016.40
5.4.10.0070.04316.29
5.4.00.0030.07015.63
5.3.290.0030.06714.71
5.3.280.0070.07014.67
5.3.270.0030.06714.52
5.3.260.0030.07314.66
5.3.250.0000.07314.66
5.3.240.0030.07714.65
5.3.230.0000.08314.55
5.3.220.0070.06014.60
5.3.210.0000.07014.61
5.3.200.0000.08014.63
5.3.190.0000.07314.67
5.3.180.0000.07014.53
5.3.170.0030.07014.63
5.3.160.0030.06714.56
5.3.150.0070.05714.66
5.3.140.0070.04014.46
5.3.130.0030.07714.59
5.3.120.0070.04714.64
5.3.110.0030.04714.60
5.3.100.0030.05014.13
5.3.90.0070.03314.01
5.3.80.0030.03314.01
5.3.70.0000.03714.07
5.3.60.0030.04014.08
5.3.50.0000.03713.87
5.3.40.0030.05313.93
5.3.30.0230.02313.91
5.3.20.0300.02313.74
5.3.10.0000.02713.57
5.3.00.0070.03313.73
5.2.170.0000.03011.00
5.2.160.0000.03711.20
5.2.150.0000.03711.21
5.2.140.0130.02311.05
5.2.130.0030.03011.14
5.2.120.0100.02011.08
5.2.110.0000.02311.16
5.2.100.0030.04711.16
5.2.90.0030.05711.09
5.2.80.0000.06011.15
5.2.70.0030.05710.95
5.2.60.0030.04710.95
5.2.50.0000.06011.01
5.2.40.0000.05311.05
5.2.30.0070.05311.02
5.2.20.0030.05010.95
5.2.10.0000.05010.92
5.2.00.0030.02710.53
5.1.60.0100.02710.44
5.1.50.0000.03310.44
5.1.40.0130.03710.44
5.1.30.0170.02010.44
5.1.20.0100.02310.44
5.1.10.0000.02310.44
5.1.00.0030.03710.44
5.0.50.0030.03010.44
5.0.40.0000.02010.44
5.0.30.0000.06010.44
5.0.20.0000.04010.44
5.0.10.0000.02010.44
5.0.00.0000.03010.44
4.4.90.0070.02310.44
4.4.80.0030.03310.44
4.4.70.0000.02710.44
4.4.60.0000.02010.44
4.4.50.0030.02010.44
4.4.40.0000.03310.44
4.4.30.0030.01710.44
4.4.20.0000.02310.44
4.4.10.0030.02310.44
4.4.00.0000.03010.44
4.3.110.0000.03710.44
4.3.100.0030.02010.44
4.3.90.0000.01710.44
4.3.80.0000.02710.44
4.3.70.0000.03710.44
4.3.60.0070.01710.44
4.3.50.0030.02010.44
4.3.40.0030.02310.44
4.3.30.0000.01710.44
4.3.20.0000.02010.44
4.3.10.0070.01310.44
4.3.00.0030.01710.44

preferences:
54.62 ms | 401 KiB | 5 Q