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, 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 __(){ $argc = func_get_args(); return new Phrase(array_shift($argc), $argc); } 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.0090.00618.56
8.3.50.0250.00622.10
8.3.40.0040.01118.98
8.3.30.0080.00619.04
8.3.20.0000.00820.25
8.3.10.0080.00023.66
8.3.00.0060.00322.37
8.2.180.0070.00716.63
8.2.170.0100.01022.96
8.2.160.0100.00322.13
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00417.63
8.2.110.0040.00422.31
8.2.100.0060.00617.78
8.2.90.0000.00819.21
8.2.80.0030.00617.97
8.2.70.0080.00017.63
8.2.60.0000.00818.16
8.2.50.0040.00418.07
8.2.40.0060.00318.14
8.2.30.0040.00418.01
8.2.20.0050.00217.80
8.2.10.0040.00417.76
8.2.00.0050.00217.63
8.1.280.0110.00425.92
8.1.270.0030.00524.01
8.1.260.0070.00326.35
8.1.250.0080.00828.09
8.1.240.0060.00323.70
8.1.230.0070.00719.09
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0080.00317.35
8.1.190.0030.00717.63
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0000.00722.07
8.1.150.0000.00718.70
8.1.140.0050.00317.52
8.1.130.0000.00717.75
8.1.120.0040.00417.48
8.1.110.0040.00417.34
8.1.100.0000.00817.50
8.1.90.0050.00217.36
8.1.80.0040.00417.38
8.1.70.0000.00817.37
8.1.60.0060.00317.61
8.1.50.0040.00417.55
8.1.40.0000.00717.49
8.1.30.0040.00417.54
8.1.20.0080.00017.62
8.1.10.0050.00317.48
8.1.00.0040.00417.38
8.0.300.0040.00418.77
8.0.290.0040.00417.15
8.0.280.0030.00318.34
8.0.270.0070.00017.19
8.0.260.0030.00316.84
8.0.250.0000.00716.88
8.0.240.0040.00417.04
8.0.230.0040.00416.99
8.0.220.0030.00316.91
8.0.210.0000.00716.77
8.0.200.0040.00416.88
8.0.190.0000.00816.99
8.0.180.0040.00416.91
8.0.170.0050.00316.97
8.0.160.0040.00416.84
8.0.150.0050.00316.84
8.0.140.0080.00016.88
8.0.130.0040.00413.32
8.0.120.0070.00016.87
8.0.110.0000.00716.92
8.0.100.0000.00716.85
8.0.90.0020.00516.77
8.0.80.0050.01216.82
8.0.70.0000.00716.77
8.0.60.0000.00716.76
8.0.50.0040.00416.70
8.0.30.0090.01317.19
8.0.20.0100.00917.40
8.0.10.0040.00416.98
8.0.00.0120.00716.84
7.4.330.0050.00015.05
7.4.320.0030.00316.43
7.4.300.0030.00316.46
7.4.290.0000.00816.51
7.4.280.0040.00416.49
7.4.270.0000.00716.49
7.4.260.0070.00016.50
7.4.250.0030.00516.59
7.4.240.0050.00216.54
7.4.230.0070.00016.68
7.4.220.0000.01616.61
7.4.210.0060.00916.53
7.4.200.0050.00316.58
7.4.190.0030.00316.56
7.4.160.0050.01016.60
7.4.150.0150.00317.40
7.4.140.0080.01017.86
7.4.130.0080.01016.61
7.4.120.0070.01016.58
7.4.110.0040.01316.49
7.4.100.0070.01016.58
7.4.90.0030.01316.41
7.4.80.0100.00716.56
7.4.70.0080.00916.55
7.4.60.0070.01116.54
7.4.50.0040.00416.65
7.4.40.0070.01122.77
7.4.30.0120.00616.36
7.4.00.0030.01415.20
7.3.330.0000.00513.27
7.3.320.0050.00013.45
7.3.310.0030.00316.42
7.3.300.0040.00416.34
7.3.290.0060.00916.43
7.3.280.0090.01016.39
7.3.270.0090.00917.40
7.3.260.0070.01716.30
7.3.250.0150.00516.38
7.3.240.0120.00916.63
7.3.230.0060.01216.47
7.3.210.0150.00616.46
7.3.200.0130.01019.39
7.3.190.0180.00416.50
7.3.180.0080.00816.54
7.3.170.0070.01316.47
7.3.160.0060.01116.62
7.3.120.0030.01014.82
7.2.330.0070.01016.60
7.2.320.0040.01416.85
7.2.310.0120.00416.79
7.2.300.0100.00716.64
7.2.290.0070.01016.54
7.2.00.0040.00719.45
7.1.100.0120.00617.94
7.1.70.0030.00617.23
7.1.60.0040.00717.33
7.1.50.0000.01117.02
7.1.00.0000.08022.36
7.0.200.0040.01416.77
7.0.140.0030.06722.15
7.0.60.0100.08320.09
7.0.50.0100.07717.90
7.0.40.0100.07720.09
7.0.30.0430.04320.26
7.0.20.0330.08320.07
7.0.10.0100.06320.21
7.0.00.0100.08020.18
5.6.280.0030.07321.07
5.6.210.0130.07020.51
5.6.200.0000.04718.18
5.6.190.0170.08020.61
5.6.180.3700.04020.39
5.6.170.0230.08020.57
5.6.160.0000.04720.39
5.6.150.0030.04018.21
5.6.140.0070.04018.15
5.6.130.0170.06718.21
5.6.120.0070.06721.00
5.6.110.0100.03721.01
5.6.100.0130.07021.01
5.6.90.0100.07721.11
5.6.80.0130.08020.39
5.6.70.4000.04020.36
5.5.350.0130.07720.34
5.5.340.0070.05017.99
5.5.330.0100.06320.29
5.5.320.0200.04020.34
5.5.310.0300.04020.51
5.5.300.0170.07018.08
5.5.290.0130.07317.98
5.5.280.0030.08720.91
5.5.270.0000.05020.65
5.5.260.0170.06320.85
5.5.250.0170.07320.79
5.5.240.0070.07320.38
5.4.450.0200.05019.47
5.4.440.0730.04319.47
5.4.430.0430.04719.32
5.4.420.0870.04319.54
5.4.410.0770.04319.19
5.4.400.0400.06018.85
5.4.390.0400.05718.77
5.4.380.0130.05318.79
5.4.370.0070.05718.80
5.4.360.0130.05018.59
5.4.350.0170.05018.59
5.4.340.0200.04318.59
5.4.320.0050.03712.51
5.4.310.0050.04212.50
5.4.300.0060.04112.51
5.4.290.0100.04812.51
5.4.280.0080.04012.40
5.4.270.0060.04412.41
5.4.260.0060.03812.40
5.4.250.0060.03812.41
5.4.240.0050.03812.40
5.4.230.0060.03712.40
5.4.220.0050.04112.40
5.4.210.0080.03412.39
5.4.200.0050.04012.39
5.4.190.0040.03912.39
5.4.180.0060.03912.39
5.4.170.0160.04512.38
5.4.160.0170.04212.38
5.4.150.0250.09612.37
5.4.140.0160.04212.05
5.4.130.0120.04612.04
5.4.120.0170.04012.00
5.4.110.0220.03512.00
5.4.100.0150.04312.00
5.4.90.0150.04312.00
5.4.80.0130.04412.00
5.4.70.0170.04011.99
5.4.60.0140.04311.99
5.4.50.0150.04211.99
5.4.40.0320.08911.98
5.4.30.0180.04311.98
5.4.20.0170.04311.98
5.4.10.0150.04311.97
5.4.00.0150.04511.46
5.3.290.0080.04212.80
5.3.280.0060.04612.70
5.3.270.0120.05012.73
5.3.260.0160.04612.72
5.3.250.0270.10012.72
5.3.240.0220.04512.72
5.3.230.0240.04112.71
5.3.220.0210.04712.68
5.3.210.0190.04312.68
5.3.200.0140.04812.68
5.3.190.0160.04612.67
5.3.180.0210.03912.67
5.3.170.0170.04312.67
5.3.160.0180.04212.67
5.3.150.0150.04512.67
5.3.140.0120.04812.66
5.3.130.0200.04012.66
5.3.120.0210.03912.66
5.3.110.0150.04712.66
5.3.100.0220.03812.13
5.3.90.0170.04112.12
5.3.80.0210.03912.09
5.3.70.0150.04412.09
5.3.60.0180.07212.08
5.3.50.0190.04112.02
5.3.40.0190.04012.02
5.3.30.0180.03912.00
5.3.20.0180.04111.77
5.3.10.0170.03911.74
5.3.00.0160.04011.71
5.2.170.0090.0389.23
5.2.160.0170.0309.22
5.2.150.0130.0349.22
5.2.140.0160.0319.23
5.2.130.0150.0339.18
5.2.120.0210.0569.18
5.2.110.0190.0299.19
5.2.100.0140.0329.20
5.2.90.0140.0329.19
5.2.80.0130.0339.19
5.2.70.0190.0289.19
5.2.60.0130.0369.13
5.2.50.0170.0319.10
5.2.40.0270.0539.07
5.2.30.0160.0399.05
5.2.20.0180.0379.06
5.2.10.0240.0328.96
5.2.00.0370.0768.81
5.1.60.0120.0298.09
5.1.50.0220.0528.09
5.1.40.0130.0338.09
5.1.30.0360.0528.43
5.1.20.0130.0308.46
5.1.10.0150.0348.17
5.1.00.0150.0298.16
5.0.50.0090.0256.64
5.0.40.0110.0216.51
5.0.30.0140.0306.32
5.0.20.0120.0206.28
5.0.10.0100.0216.26
5.0.00.0080.0356.25
4.4.90.0070.0174.78
4.4.80.0060.0184.75
4.4.70.0080.0174.76
4.4.60.0080.0174.75
4.4.50.0090.0174.77
4.4.40.0070.0294.71
4.4.30.0070.0214.76
4.4.20.0080.0194.84
4.4.10.0090.0184.85
4.4.00.0090.0284.76
4.3.110.0090.0184.67
4.3.100.0110.0144.66
4.3.90.0150.0404.63
4.3.80.0070.0274.59
4.3.70.0060.0184.63
4.3.60.0060.0184.63
4.3.50.0070.0184.62
4.3.40.0100.0264.53
4.3.30.0060.0183.30
4.3.20.0070.0163.29
4.3.10.0030.0193.26
4.3.00.0070.01312.89

preferences:
43.36 ms | 401 KiB | 5 Q