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(__('one %1 one' , 1111)); } catch (Exception $e) { var_dump(strpos($e->getMessage(), 'one 1111 one')); } $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.0040.01116.75
8.3.50.0110.01116.52
8.3.40.0000.01418.84
8.3.30.0090.00618.89
8.3.20.0080.00018.76
8.3.10.0060.00320.65
8.3.00.0080.00019.51
8.2.180.0120.00317.13
8.2.170.0120.00322.96
8.2.160.0110.00420.91
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.48
8.2.110.0060.00319.37
8.2.100.0060.00617.97
8.2.90.0000.00919.14
8.2.80.0030.00618.05
8.2.70.0000.00817.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0000.00918.34
8.2.30.0030.00518.07
8.2.20.0030.00617.80
8.2.10.0050.00317.88
8.2.00.0030.00617.91
8.1.280.0120.00325.92
8.1.270.0000.00724.66
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0040.00420.93
8.1.230.0040.00820.90
8.1.220.0060.00317.74
8.1.210.0030.00618.94
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0050.00518.10
8.1.170.0000.00818.77
8.1.160.0040.00418.91
8.1.150.0000.00718.63
8.1.140.0040.00417.41
8.1.130.0000.00717.81
8.1.120.0000.00717.48
8.1.110.0000.00817.48
8.1.100.0070.00017.49
8.1.90.0050.00317.50
8.1.80.0030.00317.52
8.1.70.0030.00317.43
8.1.60.0000.00817.61
8.1.50.0060.00317.42
8.1.40.0040.00417.57
8.1.30.0040.00417.70
8.1.20.0000.00917.58
8.1.10.0060.00317.63
8.1.00.0030.00617.51
8.0.300.0070.00020.21
8.0.290.0080.00016.88
8.0.280.0030.00318.48
8.0.270.0000.00717.32
8.0.260.0000.00616.93
8.0.250.0040.00416.95
8.0.240.0000.00916.96
8.0.230.0070.00017.07
8.0.220.0040.00416.94
8.0.210.0040.00416.96
8.0.200.0030.00316.95
8.0.190.0000.00717.10
8.0.180.0040.00417.06
8.0.170.0030.00616.92
8.0.160.0070.00016.98
8.0.150.0000.00816.94
8.0.140.0000.00716.99
8.0.130.0000.00713.39
8.0.120.0040.00416.94
8.0.110.0070.00016.87
8.0.100.0050.00317.03
8.0.90.0040.00416.91
8.0.80.0130.00317.07
8.0.70.0050.00316.87
8.0.60.0040.00416.89
8.0.50.0000.00817.06
8.0.30.0090.01317.19
8.0.20.0080.01017.05
8.0.10.0080.00017.14
8.0.00.0150.00716.83
7.4.330.0030.00213.00
7.4.320.0060.00016.64
7.4.300.0030.00516.60
7.4.290.0070.00016.69
7.4.280.0000.00816.57
7.4.270.0040.00416.59
7.4.260.0030.00313.35
7.4.250.0060.00316.57
7.4.240.0070.00016.64
7.4.230.0000.00716.75
7.4.220.0060.02016.60
7.4.210.0110.00616.56
7.4.200.0070.00016.74
7.4.190.0040.00416.55
7.4.160.0040.01216.63
7.4.150.0090.00916.51
7.4.140.0130.00516.50
7.4.130.0080.00816.53
7.4.120.0100.00716.63
7.4.110.0130.00316.38
7.4.100.0130.01016.59
7.4.90.0130.00316.66
7.4.80.0130.00916.58
7.4.70.0070.01016.59
7.4.60.0130.00616.67
7.4.50.0060.00016.44
7.4.40.0040.01116.38
7.4.30.0100.00716.52
7.4.00.0090.00914.66
7.3.330.0030.00313.42
7.3.320.0000.00513.33
7.3.310.0030.00316.39
7.3.300.0040.00416.33
7.3.290.0110.00316.48
7.3.280.0090.00716.41
7.3.270.0070.01116.44
7.3.260.0050.01516.53
7.3.250.0090.00416.54
7.3.240.0070.01016.46
7.3.230.0050.01416.38
7.3.210.0060.01016.60
7.3.200.0180.00319.39
7.3.190.0060.01816.54
7.3.180.0040.01216.46
7.3.170.0090.00916.43
7.3.160.0070.00716.55
7.3.120.0030.01314.67
7.3.10.0100.00316.71
7.3.00.0120.00616.68
7.2.330.0090.01616.71
7.2.320.0070.01316.83
7.2.310.0090.00916.76
7.2.300.0060.01016.81
7.2.290.0170.00016.81
7.2.130.0130.00316.88
7.2.120.0040.00917.06
7.2.110.0160.00316.77
7.2.100.0070.00717.00
7.2.90.0140.00416.93
7.2.80.0000.01016.87
7.2.70.0040.00816.82
7.2.60.0070.00716.96
7.2.50.0130.00616.96
7.2.40.0070.00717.01
7.2.30.0040.01517.13
7.2.20.0080.00817.02
7.2.10.0070.00416.85
7.2.00.0030.00918.34
7.1.250.0040.00415.73
7.1.240.0070.01015.93
7.1.230.0070.00715.77
7.1.220.0110.00315.84
7.1.210.0030.01015.50
7.1.200.0030.00915.72
7.1.190.0140.00315.81
7.1.180.0060.00615.78
7.1.170.0040.01115.63
7.1.160.0030.01015.96
7.1.150.0070.00315.98
7.1.140.0090.00915.57
7.1.130.0090.00315.73
7.1.120.0030.01415.97
7.1.110.0070.01015.62
7.1.100.0050.00516.96
7.1.90.0060.00315.93
7.1.80.0080.00415.65
7.1.70.0030.00816.49
7.1.60.0090.00917.60
7.1.50.0070.01216.46
7.1.40.0070.01015.74
7.1.30.0000.00815.39
7.1.20.0120.00615.79
7.1.10.0060.00615.94
7.1.00.0080.03819.06
7.0.330.0030.00715.21
7.0.320.0040.01115.30
7.0.310.0100.00714.99
7.0.300.0070.01115.23
7.0.290.0030.01015.43
7.0.280.0120.00315.24
7.0.270.0100.00615.45
7.0.260.0070.00715.24
7.0.250.0070.00415.54
7.0.240.0090.00615.54
7.0.230.0100.00715.10
7.0.220.0070.00715.42
7.0.210.0070.00715.40
7.0.200.0060.00516.09
7.0.190.0040.00815.42
7.0.180.0030.00715.32
7.0.170.0000.01015.39
7.0.160.0000.01015.52
7.0.150.0060.00615.42
7.0.140.0130.03318.54
7.0.130.0000.01515.42
7.0.120.0040.03718.79
7.0.110.0000.00815.37
7.0.100.0030.00915.38
7.0.90.0000.01315.29
7.0.80.0070.00315.46
7.0.70.0030.00715.31
7.0.60.0080.03217.60
7.0.50.0030.02916.60
7.0.40.0070.04516.77
7.0.30.0050.03116.70
7.0.20.0220.03916.73
7.0.10.0080.03316.89
7.0.00.0050.02716.74
5.6.380.0070.00714.14
5.6.370.0090.00614.55
5.6.360.0070.00314.34
5.6.350.0000.01414.29
5.6.340.0060.00314.61
5.6.330.0080.00814.39
5.6.320.0070.00414.08
5.6.310.0030.01014.54
5.6.300.0070.00314.39
5.6.290.0030.00714.02
5.6.280.0010.03917.78
5.6.270.0030.00914.34
5.6.260.0030.00614.59
5.6.250.0030.00714.52
5.6.240.0030.01014.39
5.6.230.0070.00714.63
5.6.220.0030.01014.15
5.6.210.0030.02517.38
5.6.200.0070.03016.27
5.6.190.0100.02717.51
5.6.180.0270.02817.46
5.6.170.0160.02817.52
5.6.160.0110.02817.38
5.6.150.0090.04216.14
5.6.140.0050.03016.17
5.6.130.0100.03216.25
5.6.120.0040.02717.73
5.6.110.0090.04317.77
5.6.100.0080.04117.71
5.6.90.0030.02517.59
5.6.80.0040.04917.37
5.6.70.0030.01314.21
5.6.60.0040.01114.42
5.6.50.0030.01014.04
5.6.40.0000.01314.30
5.6.30.0000.01014.50
5.6.20.0060.00614.40
5.6.10.0040.00714.10
5.6.00.0030.00614.25
5.5.380.0000.00711.46
5.5.370.0030.00611.41
5.5.360.0050.00511.16
5.5.350.0100.04015.68
5.5.340.0130.03614.37
5.5.330.0050.04515.69
5.5.320.0180.03815.74
5.5.310.0150.04215.79
5.5.300.0070.04114.55
5.5.290.0090.04214.45
5.5.280.0050.04516.11
5.5.270.0050.02315.99
5.5.260.0030.04415.98
5.5.250.0050.04215.70
5.5.240.0100.04315.71
5.5.230.0060.00911.26
5.5.220.0000.01111.44
5.5.210.0060.00011.26
5.5.200.0030.00311.10
5.5.190.0000.00811.05
5.5.180.0070.00411.41
5.5.170.0060.00611.20
5.5.160.0040.00411.38
5.5.150.0080.00411.46
5.5.140.0030.00611.22
5.5.130.0040.00410.79
5.5.120.0080.00011.04
5.5.110.0060.00810.95
5.5.100.0000.00811.10
5.5.90.0000.00811.09
5.5.80.0050.00310.83
5.5.70.0040.00411.02
5.5.60.0050.00311.39
5.5.50.0030.00711.20
5.5.40.0030.00311.09
5.5.30.0030.00711.22
5.5.20.0080.00011.30
5.5.10.0070.00011.02
5.5.00.0090.00311.21
5.4.450.0300.02715.28
5.4.440.0380.02215.33
5.4.430.0480.01915.34
5.4.420.0370.02515.31
5.4.410.0270.02315.22
5.4.400.0320.02315.13
5.4.390.0270.02515.14
5.4.380.0320.02715.01
5.4.370.0250.01715.10
5.4.360.0100.02715.13
5.4.350.0320.02014.95
5.4.340.0270.02415.16
5.4.330.0030.00511.48
5.4.320.0200.02215.08
5.4.310.0320.02215.01
5.4.300.0170.01915.22
5.4.290.0270.02815.24
5.4.280.0480.02115.20
5.4.270.0400.02615.04
5.4.260.0320.02415.10
5.4.250.0420.02014.98
5.4.240.0320.02715.20
5.4.230.0230.02015.20
5.4.220.0410.03314.99
5.4.210.0370.02114.87
5.4.200.0220.01815.06
5.4.190.0200.02515.11
5.4.180.0330.02415.01
5.4.170.0420.02215.15
5.4.160.0430.02415.00
5.4.150.0330.01815.07
5.4.140.0350.02213.76
5.4.130.0420.02513.78
5.4.120.0390.02013.92
5.4.110.0230.02813.79
5.4.100.0030.02513.85
5.4.90.0150.02513.95
5.4.80.0240.02413.79
5.4.70.0120.02513.72
5.4.60.0350.02313.69
5.4.50.0530.01513.70
5.4.40.0120.02913.74
5.4.30.0300.02013.66
5.4.20.0440.01813.86
5.4.10.0170.02813.70
5.4.00.0280.02213.59
5.3.290.0430.01813.14
5.3.280.0320.02313.17
5.3.270.0300.02213.25
5.3.260.0270.02513.24
5.3.250.0280.04713.25
5.3.240.0370.02613.14
5.3.230.0240.02013.19
5.3.220.0270.02513.14
5.3.210.0310.02113.04
5.3.200.0610.02013.14
5.3.190.0200.02513.00
5.3.180.0280.02113.08
5.3.170.0430.02013.23
5.3.160.0470.01813.16
5.3.150.0390.02213.06
5.3.140.0370.02013.20
5.3.130.0230.02713.08
5.3.120.0550.01713.20
5.3.110.0250.03113.20
5.3.100.0170.02013.18
5.3.90.0300.02113.08
5.3.80.0330.02113.13
5.3.70.0260.02313.02
5.3.60.0230.01913.02
5.3.50.0350.02013.04
5.3.40.0370.02413.11
5.3.30.0270.01913.06
5.3.20.0490.02013.14
5.3.10.0480.01613.11
5.3.00.0190.03113.03
5.2.170.0150.01812.83
5.2.160.0320.02012.83
5.2.150.0350.01712.83
5.2.140.0360.01812.83
5.2.130.0150.02112.83
5.2.120.0370.01812.83
5.2.110.0430.01812.83
5.2.100.0400.01812.83
5.2.90.0120.01712.83
5.2.80.0250.02012.83
5.2.70.0300.02112.83
5.2.60.0320.01812.83
5.2.50.0310.02012.83
5.2.40.0320.01712.83
5.2.30.0170.02012.83
5.2.20.0240.01612.83
5.2.10.0220.02212.83
5.2.00.0200.02012.83
5.1.60.0130.01312.83
5.1.50.0200.01412.83
5.1.40.0220.01912.83
5.1.30.0080.01612.83
5.1.20.0250.01112.83
5.1.10.0310.01912.83
5.1.00.0200.01612.83
5.0.50.0030.01612.83
5.0.40.0100.01112.83
5.0.30.0220.01512.83
5.0.20.0030.01312.83
5.0.10.0020.01412.83
5.0.00.0020.01712.83
4.4.90.0050.00912.83
4.4.80.0050.01112.83
4.4.70.0200.00712.83
4.4.60.0130.00812.83
4.4.50.0130.01112.83
4.4.40.0080.01312.83
4.4.30.0210.01012.83
4.4.20.0070.00812.83
4.4.10.0020.01412.83
4.4.00.0070.01812.83
4.3.110.0200.01012.83
4.3.100.0170.00712.83
4.3.90.0050.00812.83
4.3.80.0170.01212.83
4.3.70.0050.01012.83
4.3.60.0100.01112.83
4.3.50.0150.01012.83
4.3.40.0080.01412.83
4.3.30.0050.01012.83
4.3.20.0000.01112.83
4.3.10.0100.01112.83
4.3.00.0060.01112.83

preferences:
42.26 ms | 401 KiB | 5 Q