3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Phrase { public function __construct($text, array $arguments = array()) { $this->_text = (string)$text; $this->_arguments = $arguments; } public function __toString() { return $this->render($this->_text, $this->_arguments); } public function render($text, array $arguments) { if ($arguments) { $placeholders = array(); for ($i = 1, $size = count($arguments); $i <= $size; $i++) { $placeholders[] = "%$i"; } $text = str_replace($placeholders, $arguments, $text); } return $text; } } function __(){ return new Phrase(func_get_arguments()); } echo __('sdgsa gsag sg %1 gas g%2 w4', 1111,222) ,'<br>'; echo __('sdgsa gsag sg %1 gas g%2 w4', 1111) ,'<br>';

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.0110.01116.74
8.3.50.0110.00417.46
8.3.40.0140.00718.85
8.3.30.0090.00618.64
8.3.20.0090.00918.85
8.3.10.0060.00318.90
8.3.00.0080.00019.26
8.2.180.0150.00316.75
8.2.170.0140.00022.96
8.2.160.0040.01119.00
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00320.50
8.2.110.0160.00621.12
8.2.100.0040.00717.97
8.2.90.0000.00819.22
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0000.00717.91
8.2.30.0000.00718.07
8.2.20.0030.00519.46
8.2.10.0080.00017.64
8.2.00.0040.00417.76
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0040.00721.16
8.1.230.0120.00017.45
8.1.220.0050.00317.78
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00818.89
8.1.160.0040.00418.75
8.1.150.0030.00518.43
8.1.140.0040.00417.46
8.1.130.0030.00317.82
8.1.120.0040.00417.32
8.1.110.0070.00017.44
8.1.100.0020.00517.32
8.1.90.0000.00717.44
8.1.80.0070.00017.31
8.1.70.0030.00317.29
8.1.60.0000.00817.50
8.1.50.0000.00717.27
8.1.40.0050.00317.49
8.1.30.0030.00617.59
8.1.20.0000.00817.51
8.1.10.0000.00817.46
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.33
8.0.270.0030.00317.27
8.0.260.0030.00316.80
8.0.250.0000.00817.07
8.0.240.0030.00316.95
8.0.230.0030.00516.91
8.0.220.0040.00417.00
8.0.210.0030.00316.95
8.0.200.0000.00816.99
8.0.190.0000.00816.99
8.0.180.0040.00417.00
8.0.170.0060.00316.87
8.0.160.0040.00416.94
8.0.150.0040.00416.76
8.0.140.0030.00616.94
8.0.130.0000.00513.36
8.0.120.0040.00416.80
8.0.110.0040.00416.98
8.0.100.0040.00416.99
8.0.90.0040.00416.91
8.0.80.0130.00616.96
8.0.70.0040.00416.84
8.0.60.0030.00516.83
8.0.50.0040.00416.96
8.0.30.0110.00517.20
8.0.20.0120.00617.20
8.0.10.0000.00716.99
8.0.00.0130.00516.96
7.4.330.0050.00012.86
7.4.320.0000.00716.44
7.4.300.0000.00616.55
7.4.290.0060.00016.50
7.4.280.0000.00816.55
7.4.270.0040.00416.36
7.4.260.0020.00513.33
7.4.250.0000.00816.48
7.4.240.0080.00016.44
7.4.230.0030.00316.26
7.4.220.0130.00616.61
7.4.210.0100.00316.61
7.4.200.0070.00016.49
7.4.190.0070.00016.59
7.4.160.0120.00616.52
7.4.150.0040.02016.34
7.4.140.0110.01716.30
7.4.130.0030.01416.39
7.4.120.0060.01016.32
7.4.110.0070.01116.49
7.4.100.0130.00816.38
7.4.90.0030.01516.51
7.4.80.0070.01019.39
7.4.70.0050.01116.51
7.4.60.0130.00316.47
7.4.50.0000.00616.14
7.4.40.0040.01416.27
7.4.30.0060.00916.38
7.4.00.0090.00915.04
7.3.330.0000.00613.39
7.3.320.0060.00013.38
7.3.310.0050.00316.41
7.3.300.0000.00716.33
7.3.290.0060.00916.38
7.3.280.0110.00616.38
7.3.270.0100.00716.38
7.3.260.0080.01016.40
7.3.250.0090.01016.47
7.3.240.0080.00816.45
7.3.230.0100.00716.52
7.3.210.0040.01216.33
7.3.200.0100.00716.61
7.3.190.0100.00716.57
7.3.180.0130.00616.27
7.3.170.0130.00316.45
7.3.160.0110.00516.46
7.3.120.0070.00814.83
7.3.110.0100.00315.05
7.3.100.0070.00714.93
7.3.90.0120.00414.91
7.3.80.0070.01114.64
7.3.70.0130.00614.96
7.3.60.0090.00614.89
7.3.50.0060.00614.79
7.3.40.0090.00014.60
7.3.30.0030.01214.82
7.3.20.0120.00616.50
7.3.10.0070.00416.36
7.3.00.0060.00916.57
7.2.330.0060.01316.63
7.2.320.0070.01116.64
7.2.310.0030.01516.73
7.2.300.0070.01316.50
7.2.290.0090.01416.66
7.2.250.0040.01514.80
7.2.240.0090.00914.79
7.2.230.0060.01214.74
7.2.220.0070.00714.99
7.2.210.0090.00615.05
7.2.200.0000.01715.03
7.2.190.0090.00914.73
7.2.180.0070.00314.61
7.2.170.0040.00715.08
7.2.60.0110.00316.78
7.2.00.0040.00719.18
7.1.330.0100.00315.68
7.1.320.0130.00015.72
7.1.310.0060.00915.68
7.1.300.0030.01315.75
7.1.290.0090.00315.59
7.1.280.0000.01315.48
7.1.270.0060.00915.73
7.1.260.0070.00715.29
7.1.200.0030.01315.53
7.1.100.0040.00817.57
7.1.70.0000.00717.03
7.1.60.0060.01919.17
7.1.50.0060.01316.42
7.1.00.0030.05022.35
7.0.200.0060.01316.46
7.0.140.0030.07321.95
7.0.120.0100.06722.09
7.0.110.0600.05320.05
7.0.100.0530.08019.99
7.0.90.0430.08020.06
7.0.80.0530.07719.86
7.0.70.0530.06720.05
7.0.60.0370.07319.91
7.0.50.0530.07320.35
7.0.40.0300.05320.28
7.0.30.0100.07719.96
7.0.20.0030.07020.24
7.0.10.0100.07720.14
7.0.00.0070.08020.27
5.6.280.0100.06721.13
5.6.250.0070.07020.66
5.6.240.0100.08020.68
5.6.230.0000.08720.68
5.6.220.0100.06320.61
5.6.210.0100.07020.52
5.6.200.0070.07721.15
5.6.190.0030.07321.28
5.6.180.0170.06021.14
5.6.170.0130.07720.97
5.6.160.0100.08021.06
5.6.150.0070.08021.15
5.6.140.0100.07321.09
5.6.130.0070.08721.19
5.6.120.0000.09021.25
5.6.110.0070.08021.02
5.6.100.0070.08021.05
5.6.90.0000.04720.98
5.6.80.0000.05320.46
5.6.70.0070.07320.53
5.6.60.0070.08320.40
5.6.50.0000.05720.47
5.6.40.0000.05720.29
5.6.30.0130.07020.32
5.6.20.0100.08020.63
5.6.10.0130.04020.54
5.6.00.0100.03720.40
5.5.380.0070.08720.52
5.5.370.0130.06020.54
5.5.360.0070.08020.53
5.5.350.0030.08720.41
5.5.340.0030.08020.99
5.5.330.0200.06720.76
5.5.320.0130.07021.00
5.5.310.0070.07720.91
5.5.300.0070.08020.84
5.5.290.0030.08720.82
5.5.280.0170.06320.91
5.5.270.0070.05320.92
5.5.260.0000.06720.81
5.5.250.0100.08020.86
5.5.240.0070.06320.35
5.5.230.0130.07020.13
5.5.220.0100.04720.28
5.5.210.0100.07720.36
5.5.200.0170.06720.32
5.5.190.0170.04020.20
5.5.180.0100.06320.06
5.5.160.0100.04020.32
5.5.150.0070.08320.23
5.5.140.0070.07720.05
5.5.130.0070.06320.13
5.5.120.0130.03320.20
5.5.110.0100.07320.16
5.5.100.0070.08720.29
5.5.90.0070.04320.07
5.5.80.0030.04320.25
5.5.70.0130.03320.04
5.5.60.0030.05020.14
5.5.50.0070.04720.08
5.5.40.0030.07320.07
5.5.30.0100.07320.01
5.5.20.0100.07720.04
5.5.10.0130.04020.20
5.5.00.0000.07020.24
5.4.450.0030.04319.32
5.4.440.0030.08319.33
5.4.430.0070.05019.52
5.4.420.0100.08319.29
5.4.410.0100.07319.39
5.4.400.0070.06718.95
5.4.390.0030.08018.98
5.4.380.0070.07718.95
5.4.370.0070.07719.34
5.4.360.0030.07319.14
5.4.350.0130.06019.00
5.4.340.0070.08019.05
5.4.320.0100.07719.14
5.4.310.0130.07319.24
5.4.300.0200.06319.01
5.4.290.0030.06019.03
5.4.280.0030.06319.14
5.4.270.0030.07319.18
5.4.260.0000.08319.03
5.4.250.0030.06019.01
5.4.240.0030.04019.22
5.4.230.0000.08019.35
5.4.220.0030.08019.23
5.4.210.0170.06719.13
5.4.200.0130.06019.17
5.4.190.0030.06018.98
5.4.180.0030.07719.32
5.4.170.0170.06019.30
5.4.160.0030.08019.16
5.4.150.0100.05019.16
5.4.140.0030.07716.40
5.4.130.0130.06316.55
5.4.120.0130.06316.61
5.4.110.0070.05016.50
5.4.100.0100.07316.60
5.4.90.0130.06316.48
5.4.80.0070.04016.63
5.4.70.0130.05316.54
5.4.60.0000.06716.45
5.4.50.0030.06716.33
5.4.40.0030.04716.59
5.4.30.0100.07016.47
5.4.20.0030.07716.47
5.4.10.0070.07016.59
5.4.00.0100.07016.00
5.3.290.0070.08014.77
5.3.280.0000.04314.63
5.3.270.0070.07014.63
5.3.260.0030.04014.62
5.3.250.0130.06314.75
5.3.240.0100.05714.64
5.3.230.0000.04714.66
5.3.220.0100.06714.44
5.3.210.0100.07314.60
5.3.200.0100.06714.72
5.3.190.0030.07314.66
5.3.180.0170.04714.70
5.3.170.0100.06014.70
5.3.160.0100.07314.70
5.3.150.0070.07714.71
5.3.140.0100.07014.42
5.3.130.0030.08314.66
5.3.120.0030.07714.56
5.3.110.0070.04714.57
5.3.100.0030.06714.19
5.3.90.0100.06713.99
5.3.80.0130.06314.13
5.3.70.0070.07714.07
5.3.60.0100.07313.98
5.3.50.0030.07713.92
5.3.40.0000.07714.03
5.3.30.0030.07713.91
5.3.20.0030.08013.69
5.3.10.0070.07013.80
5.3.00.0000.07313.68
5.2.170.0070.06011.29
5.2.160.0070.06011.01
5.2.150.0270.02011.15
5.2.140.0000.04711.15
5.2.130.0030.05311.34
5.2.120.0130.03311.08
5.2.110.0030.06011.13
5.2.100.0070.05711.19
5.2.90.0100.04711.12
5.2.80.0100.04311.09
5.2.70.0070.06010.96
5.2.60.0100.04011.19
5.2.50.0030.06011.05
5.2.40.0070.06010.86
5.2.30.0100.05311.12
5.2.20.0000.06711.11
5.2.10.0070.06010.89
5.2.00.0030.06310.86
5.1.60.0100.0509.85
5.1.50.0070.0309.98
5.1.40.0030.0539.93
5.1.30.0100.05010.32
5.1.20.0030.05710.36
5.1.10.0030.06010.07
5.1.00.0000.05310.34
5.0.50.0070.0408.38
5.0.40.0070.0438.47
5.0.30.0030.0608.23
5.0.20.0000.0438.21
5.0.10.0100.0408.21
5.0.00.0000.0678.22
4.4.90.0000.0308.21
4.4.80.0000.0378.21
4.4.70.0030.0178.21
4.4.60.0000.0378.21
4.4.50.0000.0338.21
4.4.40.0100.0478.21
4.4.30.0000.0378.21
4.4.20.0070.0338.21
4.4.10.0000.0238.21
4.4.00.0030.0508.21
4.3.110.0030.0338.21
4.3.100.0030.0178.21
4.3.90.0000.0378.21
4.3.80.0070.0508.21
4.3.70.0000.0408.21
4.3.60.0030.0338.21
4.3.50.0070.0308.21
4.3.40.0030.0278.21
4.3.30.0030.0238.21
4.3.20.0000.0408.21
4.3.10.0000.0378.21
4.3.00.0030.0278.21

preferences:
43.21 ms | 401 KiB | 5 Q