3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Phrase { public function __construct($text, $arguments = array()) { $this->_text = (string)$text; $this->_arguments = $arguments; } public function __toString() { return $this->render($this->_text, $this->_arguments); } public function render($text, $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 __(){ $argc = func_get_args(); return new Phrase(array_shift($argc), $argc); } try { throw new Exception(__('dddd ag %1' , 5455)); } catch (Exception $e) { var_dump(strpos($e->getMessage(), 'dddd ag ')); } $a = array(__('saadfdsa'), __('sdfgsda sa%1 ', 4), __('sdgsa gsag sg %1 gas g%2 w4', 1111,222)); echo implode($a);

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.01118.68
8.3.50.0090.01122.05
8.3.40.0000.01518.92
8.3.30.0140.00018.79
8.3.20.0030.00618.89
8.3.10.0080.00021.09
8.3.00.0030.00521.98
8.2.180.0060.01516.75
8.2.170.0120.00922.96
8.2.160.0030.01020.47
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00421.13
8.2.110.0030.00620.35
8.2.100.0120.00017.84
8.2.90.0050.00319.30
8.2.80.0030.00517.97
8.2.70.0030.00617.63
8.2.60.0030.00618.16
8.2.50.0030.00718.07
8.2.40.0040.00418.34
8.2.30.0080.00021.12
8.2.20.0000.00817.86
8.2.10.0000.00817.76
8.2.00.0000.00817.88
8.1.280.0040.01225.92
8.1.270.0070.00023.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.44
8.1.230.0090.00320.89
8.1.220.0050.00318.77
8.1.210.0040.00418.87
8.1.200.0030.00717.50
8.1.190.0000.00817.65
8.1.180.0030.00618.10
8.1.170.0000.00918.68
8.1.160.0040.00418.94
8.1.150.0000.00718.68
8.1.140.0040.00417.46
8.1.130.0070.00017.93
8.1.120.0000.00717.52
8.1.110.0000.00717.45
8.1.100.0000.00717.49
8.1.90.0080.00017.50
8.1.80.0000.00817.50
8.1.70.0030.00517.45
8.1.60.0090.00017.59
8.1.50.0080.00017.55
8.1.40.0000.00817.51
8.1.30.0000.00817.58
8.1.20.0040.00417.59
8.1.10.0000.00817.61
8.1.00.0070.00317.55
8.0.300.0070.00019.88
8.0.290.0040.00417.18
8.0.280.0030.00418.41
8.0.270.0030.00317.30
8.0.260.0030.00616.84
8.0.250.0070.00017.00
8.0.240.0000.00816.95
8.0.230.0000.00817.13
8.0.220.0000.00716.90
8.0.210.0070.00017.04
8.0.200.0000.00617.03
8.0.190.0000.00717.04
8.0.180.0000.00716.91
8.0.170.0030.00616.94
8.0.160.0040.00416.95
8.0.150.0000.00716.91
8.0.140.0000.00716.82
8.0.130.0000.00513.39
8.0.120.0040.00416.99
8.0.110.0050.00316.87
8.0.100.0070.00017.00
8.0.90.0070.00016.96
8.0.80.0070.01517.05
8.0.70.0000.00717.01
8.0.60.0050.00316.96
8.0.50.0000.00716.79
8.0.30.0100.00817.01
8.0.20.0110.01217.40
8.0.10.0080.00016.97
8.0.00.0080.01216.88
7.4.330.0020.00214.66
7.4.320.0050.00216.52
7.4.300.0030.00316.63
7.4.290.0020.00516.55
7.4.280.0070.00016.67
7.4.270.0030.00316.46
7.4.260.0000.00613.36
7.4.250.0040.00416.65
7.4.240.0080.00016.56
7.4.230.0000.00716.63
7.4.220.0100.01016.64
7.4.210.0050.01116.68
7.4.200.0080.00016.76
7.4.190.0050.00516.81
7.4.160.0000.01616.60
7.4.150.0070.01717.40
7.4.140.0060.01217.86
7.4.130.0140.00816.54
7.4.120.0090.00916.62
7.4.110.0090.01516.40
7.4.100.0070.01116.50
7.4.90.0190.00716.43
7.4.80.0090.01219.39
7.4.70.0040.01316.60
7.4.60.0030.01616.70
7.4.50.0030.00616.60
7.4.40.0070.01022.77
7.4.30.0120.00316.67
7.4.00.0070.00714.75
7.3.330.0050.00013.46
7.3.320.0020.00313.53
7.3.310.0070.00016.32
7.3.300.0070.00016.34
7.3.290.0000.01416.43
7.3.280.0100.00916.47
7.3.270.0130.00917.40
7.3.260.0080.00918.24
7.3.250.0110.00616.56
7.3.240.0040.01316.43
7.3.230.0100.00716.50
7.3.210.0130.00616.54
7.3.200.0110.00819.39
7.3.190.0130.00616.48
7.3.180.0140.00416.70
7.3.170.0100.00716.60
7.3.160.0110.00716.46
7.3.120.0060.00914.72
7.2.330.0110.00816.87
7.2.320.0110.00716.90
7.2.310.0090.00916.79
7.2.300.0150.00316.85
7.2.290.0070.01116.39
7.2.00.0180.01219.21
7.1.100.0050.00517.71
7.1.70.0040.00416.87
7.1.60.0000.02419.40
7.1.50.0040.01517.03
7.1.00.0000.03722.51
7.0.200.0030.01016.85
7.0.140.0030.07322.00
7.0.70.0100.08021.82
7.0.60.0000.06321.79
7.0.50.0100.07722.08
7.0.40.0030.07020.10
7.0.30.0070.08720.05
7.0.20.0030.09019.94
7.0.10.0030.07720.09
7.0.00.0130.08320.03
5.6.280.0000.07721.08
5.6.220.0130.08020.62
5.6.210.0070.06020.77
5.6.200.0170.07721.14
5.6.190.0000.04721.04
5.6.180.0070.08320.94
5.6.170.0070.09321.05
5.6.160.0070.08021.09
5.6.150.0000.09021.11
5.6.140.0030.04320.96
5.6.130.0070.03721.02
5.6.120.0070.04721.05
5.6.110.0030.04321.00
5.6.100.0070.05321.02
5.6.90.0030.09020.95
5.6.80.0070.06020.50
5.6.70.0030.06320.43
5.6.60.0000.08720.55
5.6.50.0030.08320.33
5.6.40.0070.08320.39
5.6.30.0100.07720.50
5.6.20.0000.08020.39
5.6.10.0100.05720.30
5.6.00.0100.07020.31
5.5.360.0070.08720.37
5.5.350.0100.08020.40
5.5.340.0030.07020.66
5.5.330.0070.08320.92
5.5.320.0100.06720.85
5.5.310.0130.07020.93
5.5.300.0000.07320.88
5.5.290.0130.05720.88
5.5.280.0030.06320.92
5.5.270.0070.08320.83
5.5.260.0070.08020.87
5.5.250.0030.06320.64
5.5.240.0030.07320.17
5.5.230.0030.07020.28
5.5.220.0030.04720.23
5.5.210.0100.05020.20
5.5.200.0070.07020.20
5.5.190.0000.09020.27
5.5.180.0030.08019.96
5.5.160.0200.07020.27
5.5.150.0070.07720.00
5.5.140.0100.07720.24
5.5.130.0030.08320.26
5.5.120.0030.08020.09
5.5.110.0100.07320.27
5.5.100.0100.07020.14
5.5.90.0070.07320.07
5.5.80.0100.06720.17
5.5.70.0030.06320.05
5.5.60.0000.06020.16
5.5.50.0100.07020.16
5.5.40.0170.06719.97
5.5.30.0000.06020.15
5.5.20.0070.05020.01
5.5.10.0030.07720.05
5.5.00.0030.07719.98
5.4.450.0070.07719.37
5.4.440.0030.08019.37
5.4.430.0030.07319.48
5.4.420.0000.08319.37
5.4.410.0070.06019.32
5.4.400.0030.06318.95
5.4.390.0030.07319.03
5.4.380.0030.07718.98
5.4.370.0070.04718.90
5.4.360.0130.07018.90
5.4.350.0100.07019.21
5.4.340.0030.06019.10
5.4.320.0030.06719.03
5.4.310.0030.07719.09
5.4.300.0100.06719.18
5.4.290.0130.07019.12
5.4.280.0070.07018.85
5.4.270.0030.06019.20
5.4.260.0100.07019.03
5.4.250.0030.08018.84
5.4.240.0130.07018.87
5.4.230.0000.06018.86
5.4.220.0070.07719.12
5.4.210.0030.06019.18
5.4.200.0030.07719.12
5.4.190.0070.07019.07
5.4.180.0030.08018.91
5.4.170.0070.07319.22
5.4.160.0030.04019.01
5.4.150.0070.07019.14
5.4.140.0030.03716.30
5.4.130.0070.07316.23
5.4.120.0030.05716.50
5.4.110.0100.06316.52
5.4.100.0070.07316.41
5.4.90.0030.06316.49
5.4.80.0070.05016.47
5.4.70.0000.06016.50
5.4.60.0030.05716.42
5.4.50.0070.06716.42
5.4.40.0000.07316.46
5.4.30.0030.07716.39
5.4.20.0100.06316.36
5.4.10.0030.07716.36
5.4.00.0070.05315.94
5.3.290.0030.05014.69
5.3.280.0030.07714.55
5.3.270.0070.07314.64
5.3.260.0100.07014.55
5.3.250.0030.05014.55
5.3.240.0030.05714.74
5.3.230.0000.06014.73
5.3.220.0000.03714.63
5.3.210.0030.04014.59
5.3.200.0000.06714.64
5.3.190.0070.07714.60
5.3.180.0030.05014.58
5.3.170.0030.04314.55
5.3.160.0030.07714.57
5.3.150.0030.07314.70
5.3.140.0070.07314.68
5.3.130.0030.07714.70
5.3.120.0030.08014.59
5.3.110.0070.04314.63
5.3.100.0100.06714.07
5.3.90.0030.05314.16
5.3.80.0000.06014.04
5.3.70.0000.07714.01
5.3.60.0030.07014.10
5.3.50.0000.06313.88
5.3.40.0030.06013.87
5.3.30.0000.06013.98
5.3.20.0100.06313.82
5.3.10.0030.04313.59
5.3.00.0000.06713.54
5.2.170.0000.06312.22
5.2.160.0000.06712.22
5.2.150.0000.06712.22
5.2.140.0000.06312.22
5.2.130.0000.06012.22
5.2.120.0030.05012.22
5.2.110.0030.05712.22
5.2.100.0000.04012.22
5.2.90.0070.06012.22
5.2.80.0030.06312.22
5.2.70.0030.06312.22
5.2.60.0030.05712.22
5.2.50.0030.03312.22
5.2.40.0030.06012.22
5.2.30.0030.06012.22
5.2.20.0000.06312.22
5.2.10.0030.04312.22
5.2.00.0000.04012.22
5.1.60.0100.04712.22
5.1.50.0030.02312.22
5.1.40.0030.05312.22
5.1.30.0070.04312.22
5.1.20.0070.03312.22
5.1.10.0000.03312.22
5.1.00.0030.03012.22
5.0.50.0030.04312.22
5.0.40.0070.03712.22
5.0.30.0000.07012.22
5.0.20.0030.04312.22
5.0.10.0000.04712.22
5.0.00.0030.06312.22
4.4.90.0000.03712.22
4.4.80.0030.02312.22
4.4.70.0000.04012.22
4.4.60.0030.03312.22
4.4.50.0070.02012.22
4.4.40.0000.03012.22
4.4.30.0000.01712.22
4.4.20.0030.02012.22
4.4.10.0030.02312.22
4.4.00.0030.05312.22
4.3.110.0000.03712.22
4.3.100.0000.03712.22
4.3.90.0000.03312.22
4.3.80.0030.04712.22
4.3.70.0070.03012.22
4.3.60.0070.03012.22
4.3.50.0030.03312.22
4.3.40.0030.04012.22
4.3.30.0030.03312.22
4.3.20.0130.02012.22
4.3.10.0030.03312.22
4.3.00.0000.03712.22

preferences:
47.4 ms | 401 KiB | 5 Q