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(), 'sadasgsg dddd ag sagasgsad ')); } $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.0080.01218.56
8.3.50.0120.00717.45
8.3.40.0080.00818.88
8.3.30.0110.00418.71
8.3.20.0030.00518.77
8.3.10.0100.00020.66
8.3.00.0040.00419.51
8.2.180.0120.00916.75
8.2.170.0040.01122.96
8.2.160.0100.00719.05
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0090.00318.88
8.2.110.0060.00320.77
8.2.100.0100.00317.84
8.2.90.0030.00619.01
8.2.80.0000.00819.28
8.2.70.0000.00817.75
8.2.60.0080.00017.89
8.2.50.0030.00518.07
8.2.40.0040.00420.00
8.2.30.0000.00718.13
8.2.20.0040.00419.52
8.2.10.0030.00517.91
8.2.00.0000.00817.71
8.1.280.0120.00925.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00022.08
8.1.230.0110.00021.03
8.1.220.0000.00818.77
8.1.210.0030.00619.02
8.1.200.0030.00717.35
8.1.190.0040.00417.63
8.1.180.0030.00518.10
8.1.170.0050.00318.83
8.1.160.0030.00618.96
8.1.150.0040.00418.59
8.1.140.0040.00417.36
8.1.130.0030.00317.87
8.1.120.0030.00517.52
8.1.110.0000.00817.50
8.1.100.0040.00417.46
8.1.90.0040.00417.43
8.1.80.0080.00017.48
8.1.70.0080.00017.49
8.1.60.0040.00417.46
8.1.50.0040.00417.48
8.1.40.0000.00717.39
8.1.30.0090.00017.63
8.1.20.0060.00317.52
8.1.10.0060.00317.61
8.1.00.0040.00417.48
8.0.300.0000.00719.98
8.0.290.0040.00416.75
8.0.280.0000.00818.40
8.0.270.0040.00417.26
8.0.260.0000.00716.84
8.0.250.0070.00017.09
8.0.240.0040.00416.97
8.0.230.0080.00017.01
8.0.220.0070.00016.98
8.0.210.0000.00716.98
8.0.200.0030.00317.12
8.0.190.0000.00717.13
8.0.180.0030.00517.01
8.0.170.0040.00416.96
8.0.160.0070.00016.90
8.0.150.0000.00917.02
8.0.140.0030.00916.99
8.0.130.0030.00313.39
8.0.120.0080.00017.01
8.0.110.0050.00316.88
8.0.100.0050.00216.98
8.0.90.0000.00716.93
8.0.80.0090.00616.95
8.0.70.0050.00216.95
8.0.60.0000.00717.03
8.0.50.0000.00716.82
8.0.30.0120.00416.75
8.0.20.0060.01317.29
8.0.10.0040.00417.16
8.0.00.0070.01116.84
7.4.330.0000.00513.06
7.4.320.0000.00616.49
7.4.300.0030.00316.62
7.4.290.0000.00716.50
7.4.280.0050.00516.52
7.4.270.0040.00416.54
7.4.260.0000.00513.33
7.4.250.0000.00816.60
7.4.240.0000.00816.65
7.4.230.0070.00016.74
7.4.220.0070.01416.58
7.4.210.0030.01316.48
7.4.200.0040.00416.38
7.4.190.0050.00216.77
7.4.160.0060.00916.71
7.4.150.0180.00616.54
7.4.140.0070.01016.64
7.4.130.0070.01716.45
7.4.120.0100.00616.52
7.4.110.0160.00816.55
7.4.100.0060.01916.59
7.4.90.0070.01716.62
7.4.80.0100.01319.39
7.4.70.0080.00816.37
7.4.60.0120.00316.55
7.4.50.0030.00316.67
7.4.40.0110.00416.37
7.4.30.0100.00716.45
7.4.00.0050.00915.01
7.3.330.0000.00613.46
7.3.320.0000.00613.24
7.3.310.0000.00716.49
7.3.300.0040.00416.38
7.3.290.0080.00716.47
7.3.280.0100.00716.48
7.3.270.0160.01316.43
7.3.260.0110.00616.42
7.3.250.0090.00916.55
7.3.240.0070.01016.70
7.3.230.0090.00916.47
7.3.210.0100.01316.43
7.3.200.0060.01116.52
7.3.190.0060.00916.54
7.3.180.0040.01216.57
7.3.170.0060.00916.67
7.3.160.0090.01016.69
7.3.120.0120.00314.83
7.3.110.0040.01114.75
7.3.100.0110.00414.79
7.3.90.0090.00015.01
7.3.80.0070.00714.66
7.3.70.0030.01015.02
7.3.60.0100.00314.78
7.3.50.0070.01014.96
7.3.40.0120.00315.09
7.3.30.0060.00614.95
7.3.20.0080.00416.79
7.3.10.0080.00316.77
7.3.00.0030.00916.50
7.2.330.0060.01016.85
7.2.320.0170.00016.54
7.2.310.0070.01416.48
7.2.300.0070.01716.85
7.2.290.0100.00716.61
7.2.250.0100.00715.28
7.2.240.0120.00615.35
7.2.230.0040.01115.22
7.2.220.0000.00915.20
7.2.210.0030.01015.36
7.2.200.0080.00314.99
7.2.190.0090.00615.11
7.2.180.0040.01115.04
7.2.170.0070.01114.91
7.2.00.0000.01519.25
7.1.330.0040.01115.82
7.1.320.0030.00915.85
7.1.310.0040.01215.69
7.1.300.0040.01115.86
7.1.290.0030.00615.92
7.1.280.0070.01015.86
7.1.270.0070.00415.79
7.1.260.0090.00015.80
7.1.200.0040.00815.68
7.1.70.0060.00616.97
7.1.60.0090.00916.68
7.1.50.0040.00816.93
7.1.00.0070.06322.48
7.0.200.0060.01216.85
7.0.140.0030.07322.12
7.0.120.0000.07022.05
7.0.60.0130.07320.06
7.0.50.0030.06717.90
7.0.40.0070.04717.75
7.0.30.0070.03717.68
7.0.20.0030.04017.82
7.0.10.0000.04317.72
7.0.00.0030.04017.85
5.6.280.0030.07320.82
5.6.210.0000.05020.77
5.6.200.0070.04018.25
5.6.190.0070.04718.18
5.6.180.0070.03718.16
5.6.170.0030.05018.27
5.6.160.0070.03318.22
5.6.150.0170.03718.18
5.6.140.0100.03318.18
5.6.130.0070.04318.27
5.6.120.0000.04318.21
5.6.110.0030.04018.23
5.6.100.0030.04018.15
5.6.90.0070.03718.19
5.6.80.0170.07017.51
5.6.70.0070.03317.56
5.6.60.0030.04017.59
5.6.50.0070.04017.57
5.6.40.0000.05317.55
5.6.30.0070.07717.63
5.6.20.0170.07017.50
5.6.10.0070.05017.50
5.6.00.0070.05017.53
5.5.350.0270.06020.45
5.5.340.0100.03717.99
5.5.330.0000.04317.95
5.5.320.0100.04717.99
5.5.310.0070.03718.08
5.5.300.0070.03318.01
5.5.290.0170.03717.97
5.5.280.0100.03717.93
5.5.270.0030.04017.98
5.5.260.0000.05017.98
5.5.250.0030.03717.84
5.5.240.0030.07017.47
5.5.230.0070.08017.37
5.5.220.0000.04017.33
5.5.210.0130.05717.37
5.5.200.0070.07717.37
5.5.190.0130.04717.44
5.5.180.0070.05017.40
5.5.160.0030.06017.37
5.5.150.0130.07017.36
5.5.140.0100.04017.36
5.5.130.0070.07717.27
5.5.120.0130.05017.39
5.5.110.0070.08017.27
5.5.100.0170.06717.20
5.5.90.0070.04317.28
5.5.80.0200.03317.17
5.5.70.0030.08317.21
5.5.60.0100.07017.29
5.5.50.0070.07317.32
5.5.40.0100.07017.19
5.5.30.0000.08317.32
5.5.20.0070.07717.19
5.5.10.0100.05717.28
5.5.00.0030.07017.21
5.4.450.0000.04019.37
5.4.440.0000.04019.38
5.4.430.0000.04019.27
5.4.420.0030.04019.32
5.4.410.0000.05319.33
5.4.400.0000.05019.13
5.4.390.0030.05019.13
5.4.380.0070.06319.05
5.4.370.0200.06319.27
5.4.360.0030.06719.02
5.4.350.0100.07319.02
5.4.340.0030.06019.05
5.4.320.0170.07019.13
5.4.310.0100.04719.05
5.4.300.0100.07719.04
5.4.290.0170.06319.02
5.4.280.0030.04319.26
5.4.270.0100.06719.04
5.4.260.0000.05719.05
5.4.250.0130.04319.00
5.4.240.0030.08018.98
5.4.230.0100.07019.11
5.4.220.0170.06719.00
5.4.210.0130.07019.12
5.4.200.0100.04718.87
5.4.190.0070.06019.04
5.4.180.0100.07319.10
5.4.170.0100.03318.87
5.4.160.0000.08319.16
5.4.150.0030.05719.07
5.4.140.0100.05016.43
5.4.130.0070.05316.44
5.4.120.0070.04716.56
5.4.110.0070.06016.62
5.4.100.0030.04316.48
5.4.90.0030.05016.47
5.4.80.0070.04316.51
5.4.70.0000.07316.26
5.4.60.0100.04016.46
5.4.50.0200.06016.30
5.4.40.0070.06716.43
5.4.30.0170.06316.20
5.4.20.0000.07716.20
5.4.10.0130.07016.31
5.4.00.0030.07015.83
5.3.290.0030.05314.70
5.3.280.0100.07314.60
5.3.270.0030.04714.67
5.3.260.0100.07714.68
5.3.250.0130.04314.67
5.3.240.0030.07314.58
5.3.230.0100.06014.71
5.3.220.0030.08014.63
5.3.210.0130.07314.79
5.3.200.0030.06014.65
5.3.190.0100.07314.63
5.3.180.0030.07714.65
5.3.170.0100.06714.60
5.3.160.0130.03314.54
5.3.150.0100.06714.57
5.3.140.0030.08014.61
5.3.130.0170.06714.58
5.3.120.0070.04714.61
5.3.110.0170.07014.61
5.3.100.0130.07014.26
5.3.90.0000.08314.06
5.3.80.0100.07314.09
5.3.70.0130.06714.04
5.3.60.0170.05314.05
5.3.50.0130.04714.00
5.3.40.0030.07714.00
5.3.30.0070.06313.82
5.3.20.0070.07713.56
5.3.10.0070.07013.65
5.3.00.0070.07313.68
5.2.170.0070.06011.21
5.2.160.0070.06011.05
5.2.150.0030.04311.25
5.2.140.0070.06311.16
5.2.130.0130.06011.00
5.2.120.0030.06011.12
5.2.110.0030.03010.97
5.2.100.0070.03011.32
5.2.90.0030.04311.32
5.2.80.0130.05011.11
5.2.70.0030.06711.15
5.2.60.0070.05711.13
5.2.50.0030.06311.06
5.2.40.0100.05010.90
5.2.30.0000.04310.97
5.2.20.0030.03310.98
5.2.10.0030.06010.86
5.2.00.0130.05310.73
5.1.60.0070.05710.00
5.1.50.0030.02710.00
5.1.40.0000.0509.95
5.1.30.0070.04310.40
5.1.20.0070.05010.57
5.1.10.0070.0509.89
5.1.00.0030.05710.07
5.0.50.0000.0438.54
5.0.40.0070.0378.34
5.0.30.0070.0608.26
5.0.20.0070.0238.28
5.0.10.0030.0178.39
5.0.00.0030.0538.20
4.4.90.0070.0338.10
4.4.80.0130.0278.10
4.4.70.0030.0378.10
4.4.60.0070.0138.10
4.4.50.0030.0178.10
4.4.40.0000.0438.10
4.4.30.0070.0178.10
4.4.20.0000.0238.10
4.4.10.0030.0308.10
4.4.00.0030.0538.10
4.3.110.0000.0378.10
4.3.100.0000.0238.10
4.3.90.0000.0178.10
4.3.80.0070.0338.10
4.3.70.0030.0238.10
4.3.60.0000.0208.10
4.3.50.0000.0208.10
4.3.40.0030.0408.10
4.3.30.0000.0408.10
4.3.20.0000.0208.10
4.3.10.0030.0238.10
4.3.00.0030.0238.10

preferences:
44.83 ms | 401 KiB | 5 Q