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 __(){ $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.0070.00716.88
8.3.50.0080.01022.16
8.3.40.0140.00718.94
8.3.30.0030.01019.25
8.3.20.0030.00620.13
8.3.10.0040.00423.59
8.3.00.0040.00420.71
8.2.180.0070.01418.29
8.2.170.0150.00022.96
8.2.160.0030.01020.46
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00022.20
8.2.110.0100.00622.18
8.2.100.0040.00717.97
8.2.90.0060.00319.30
8.2.80.0050.00318.16
8.2.70.0030.00617.50
8.2.60.0000.00818.16
8.2.50.0060.00318.07
8.2.40.0050.00318.16
8.2.30.0030.00518.18
8.2.20.0030.00617.61
8.2.10.0000.00819.41
8.2.00.0080.00017.64
8.1.280.0160.00325.92
8.1.270.0030.00523.96
8.1.260.0050.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0070.00319.15
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0000.01017.35
8.1.190.0040.00417.53
8.1.180.0000.00918.10
8.1.170.0030.00618.47
8.1.160.0000.00721.95
8.1.150.0070.00018.56
8.1.140.0040.00417.47
8.1.130.0040.00417.72
8.1.120.0000.00717.51
8.1.110.0070.00017.45
8.1.100.0040.00417.42
8.1.90.0040.00417.38
8.1.80.0080.00017.36
8.1.70.0030.00317.35
8.1.60.0080.00017.63
8.1.50.0030.00617.49
8.1.40.0030.00617.46
8.1.30.0030.00617.55
8.1.20.0080.00017.67
8.1.10.0000.00817.57
8.1.00.0060.00317.54
8.0.300.0040.00418.77
8.0.290.0060.00317.18
8.0.280.0030.00318.39
8.0.270.0040.00417.23
8.0.260.0030.00316.71
8.0.250.0070.00016.94
8.0.240.0050.00217.01
8.0.230.0030.00316.94
8.0.220.0070.00016.91
8.0.210.0030.00316.89
8.0.200.0030.00316.95
8.0.190.0040.00417.01
8.0.180.0060.00316.96
8.0.170.0000.00816.94
8.0.160.0070.00017.04
8.0.150.0000.00716.88
8.0.140.0040.00416.82
8.0.130.0060.00013.32
8.0.120.0070.00016.87
8.0.110.0050.00316.89
8.0.100.0070.00016.81
8.0.90.0080.00016.78
8.0.80.0110.00716.91
8.0.70.0030.00516.84
8.0.60.0020.00516.91
8.0.50.0040.00416.78
8.0.30.0110.00716.97
8.0.20.0070.01117.40
8.0.10.0040.00416.89
8.0.00.0090.00916.62
7.4.330.0020.00215.15
7.4.320.0060.00016.62
7.4.300.0060.00016.59
7.4.290.0000.00716.50
7.4.280.0000.00716.40
7.4.270.0070.00016.46
7.4.260.0040.00716.50
7.4.250.0000.00716.37
7.4.240.0040.00416.54
7.4.230.0070.00016.72
7.4.220.0040.01316.58
7.4.210.0080.00616.55
7.4.200.0030.00316.62
7.4.190.0040.00416.69
7.4.160.0100.00716.58
7.4.150.0130.00317.40
7.4.140.0110.00617.86
7.4.130.0090.00716.57
7.4.120.0040.01416.54
7.4.110.0030.01316.71
7.4.100.0090.00916.41
7.4.90.0040.01416.39
7.4.80.0090.01219.39
7.4.70.0060.01016.41
7.4.60.0100.00716.47
7.4.50.0030.00616.58
7.4.40.0070.00722.77
7.4.30.0030.01316.58
7.4.00.0050.01214.99
7.3.330.0000.00513.34
7.3.320.0000.00613.20
7.3.310.0000.00716.39
7.3.300.0030.00316.37
7.3.290.0040.01216.35
7.3.280.0060.00916.42
7.3.270.0030.01617.40
7.3.260.0100.00716.78
7.3.250.0090.00916.42
7.3.240.0170.00316.31
7.3.230.0070.01016.40
7.3.210.0070.01016.32
7.3.200.0090.01319.39
7.3.190.0180.00316.61
7.3.180.0070.01016.36
7.3.170.0070.01016.64
7.3.160.0060.01016.44
7.3.120.0030.01315.01
7.3.110.0060.00814.61
7.3.100.0080.00814.81
7.3.90.0070.00815.05
7.3.80.0020.01214.88
7.3.70.0070.00514.75
7.3.60.0080.00514.85
7.3.50.0030.00814.90
7.3.40.0000.01214.74
7.3.30.0080.00814.82
7.3.20.0050.00816.76
7.3.10.0020.01216.56
7.3.00.0030.00916.67
7.2.330.0110.01516.88
7.2.320.0110.00516.81
7.2.310.0120.01216.59
7.2.300.0040.01316.66
7.2.290.0060.01016.62
7.2.250.0110.00814.98
7.2.240.0110.00815.18
7.2.230.0110.00714.96
7.2.220.0050.00915.15
7.2.210.0100.00715.15
7.2.200.0060.00715.00
7.2.190.0030.01315.19
7.2.180.0060.00915.14
7.2.170.0030.01215.23
7.2.00.0030.01019.48
7.1.330.0050.01015.96
7.1.320.0030.01015.82
7.1.310.0070.01115.96
7.1.300.0050.00715.89
7.1.290.0040.00715.69
7.1.280.0030.01315.86
7.1.270.0050.01215.72
7.1.260.0040.01116.02
7.1.200.0080.00815.69
7.1.100.0070.00718.13
7.1.70.0060.00616.98
7.1.60.0090.01519.29
7.1.50.0150.00616.77
7.1.00.0000.08022.25
7.0.200.0080.00316.85
7.0.140.0030.07322.10
7.0.60.0100.06020.06
7.0.50.0100.05717.89
7.0.40.0130.07720.02
7.0.30.0370.07320.09
7.0.20.0230.04720.08
7.0.10.0100.08720.23
7.0.00.0070.07320.14
5.6.280.0000.07321.13
5.6.210.0070.04020.57
5.6.200.0100.05718.27
5.6.190.0070.09020.63
5.6.180.0370.03720.64
5.6.170.0270.07720.39
5.6.160.0130.07320.50
5.6.150.0030.04318.22
5.6.140.0070.04318.11
5.6.130.0070.05318.21
5.6.120.0030.04320.99
5.6.110.0130.08320.90
5.6.100.0100.08721.14
5.6.90.0130.07021.04
5.6.80.0100.05320.54
5.5.350.0230.07720.47
5.5.340.0030.04717.99
5.5.330.0070.08020.41
5.5.320.0470.06720.38
5.5.310.0300.07320.32
5.5.300.0000.04717.92
5.5.290.0070.07317.98
5.5.280.0100.04020.88
5.5.270.0070.04020.88
5.5.260.0130.07720.89
5.5.250.0030.06720.67
5.5.240.0230.04320.16
5.4.450.0670.06319.30
5.4.440.0900.05019.59
5.4.430.0770.06019.47
5.4.420.0630.05719.56
5.4.410.0800.06319.07
5.4.400.0600.05718.84
5.4.390.0800.05019.30
5.4.380.0230.05718.73
5.4.370.0370.04718.79
5.4.360.0470.03318.73
5.4.350.0130.07018.79
5.4.340.0170.05318.54
5.4.320.0070.04012.51
5.4.310.0050.04312.50
5.4.300.0030.04212.51
5.4.290.0050.03812.51
5.4.280.0050.03612.40
5.4.270.0070.04312.40
5.4.260.0060.04812.40
5.4.250.0090.04012.41
5.4.240.0070.03612.40
5.4.230.0050.04212.39
5.4.220.0040.03712.39
5.4.210.0070.03412.39
5.4.200.0060.03712.39
5.4.190.0100.03312.39
5.4.180.0080.03512.39
5.4.170.0200.04212.38
5.4.160.0400.08212.38
5.4.150.0210.04512.37
5.4.140.0160.04412.05
5.4.130.0210.04512.04
5.4.120.0160.04712.00
5.4.110.0170.04112.00
5.4.100.0160.04412.00
5.4.90.0150.04612.00
5.4.80.0210.04412.00
5.4.70.0210.03911.99
5.4.60.0240.06912.00
5.4.50.0230.04211.99
5.4.40.0220.03911.98
5.4.30.0140.04911.98
5.4.20.0230.03811.98
5.4.10.0200.04211.97
5.4.00.0220.04111.46
5.3.290.0080.04612.80
5.3.280.0060.04712.71
5.3.270.0300.09712.73
5.3.260.0150.05412.72
5.3.250.0230.04312.72
5.3.240.0150.04612.72
5.3.230.0200.04212.70
5.3.220.0240.06712.68
5.3.210.0150.04912.68
5.3.200.0200.04012.68
5.3.190.0280.06612.67
5.3.180.0160.04612.67
5.3.170.0150.04812.67
5.3.160.0230.04212.67
5.3.150.0180.04412.67
5.3.140.0220.04012.66
5.3.130.0140.04812.66
5.3.120.0240.04612.66
5.3.110.0430.09412.66
5.3.100.0190.04512.13
5.3.90.0210.03912.11
5.3.80.0140.04612.09
5.3.70.0170.04412.09
5.3.60.0260.04012.08
5.3.50.0190.04412.03
5.3.40.0360.06912.02
5.3.30.0300.04812.00
5.3.20.0170.05011.77
5.3.10.0190.04711.74
5.3.00.0410.09411.72
5.2.170.0250.0609.23
5.2.160.0150.0389.23
5.2.150.0180.0349.23
5.2.140.0150.0349.22
5.2.130.0150.0369.19
5.2.120.0110.0429.18
5.2.110.0140.0379.18
5.2.100.0160.0389.20
5.2.90.0160.0329.19
5.2.80.0190.0299.18
5.2.70.0130.0359.18
5.2.60.0130.0359.13
5.2.50.0140.0339.10
5.2.40.0130.0379.07
5.2.30.0300.0769.05
5.2.20.0120.0359.05
5.2.10.0150.0338.96
5.2.00.0120.0368.81
5.1.60.0110.0308.09
5.1.50.0120.0318.10
5.1.40.0090.0308.08
5.1.30.0150.0278.43
5.1.20.0140.0298.46
5.1.10.0090.0338.17
5.1.00.0080.0338.17
5.0.50.0080.0256.63
5.0.40.0060.0266.50
5.0.30.0100.0346.31
5.0.20.0100.0226.28
5.0.10.0080.0236.25
5.0.00.0120.0326.24
4.4.90.0070.0204.78
4.4.80.0190.0384.75
4.4.70.0060.0194.75
4.4.60.0060.0204.75
4.4.50.0060.0194.77
4.4.40.0080.0304.71
4.4.30.0090.0184.76
4.4.20.0130.0124.85
4.4.10.0080.0184.85
4.4.00.0100.0294.76
4.3.110.0110.0174.67
4.3.100.0070.0194.66
4.3.90.0120.0144.63
4.3.80.0080.0274.58
4.3.70.0070.0184.63
4.3.60.0080.0164.63
4.3.50.0060.0194.62
4.3.40.0070.0274.54
4.3.30.0040.0203.30
4.3.20.0050.0193.29
4.3.10.0030.0253.25
4.3.00.0170.0207.18

preferences:
42.63 ms | 401 KiB | 5 Q