3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_1 = "uno"; $_3 = "tres"; $_5 = "cinco"; $t0 = microtime(TRUE); for ($i = 0; $i < 500; ++$i) { $s = "$_1 dos $_3 cuatro $_5\n"; } $t1 = microtime(TRUE); echo ($t1 - $t0) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = $_1 . " dos " . $_3 . " cuatro " . $_5 . "\n"; } $t2 = microtime(TRUE); echo ($t2 - $t1) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = $_1 . ' dos ' . $_3 . ' cuatro ' . $_5 . PHP_EOL; } $t3 = microtime(TRUE); echo ($t3 - $t2) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = sprintf("%s dos %s cuatro %s\n", $_1, $_3, $_5); } $t4 = microtime(TRUE); echo ($t4 - $t3) . "seconds\n";

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)
7.4.10.0070.00514.79
7.4.00.0070.01314.85
7.3.130.0100.01015.02
7.3.120.0000.01915.07
7.3.110.0100.00714.94
7.3.100.0140.00314.52
7.3.90.0090.00614.80
7.3.80.0000.01414.81
7.3.70.0000.01414.79
7.3.60.0060.00914.87
7.3.50.0090.00614.90
7.3.40.0110.00314.80
7.3.30.0000.01814.86
7.3.20.0110.00316.67
7.3.10.0030.01216.72
7.3.00.0040.01116.73
7.2.260.0130.00615.27
7.2.250.0150.00415.04
7.2.240.0030.01314.93
7.2.230.0100.00714.95
7.2.220.0080.00815.19
7.2.210.0000.01214.92
7.2.200.0110.00315.25
7.2.190.0000.01715.08
7.2.180.0040.01415.13
7.2.170.0070.00714.86
7.2.160.0040.01115.27
7.2.150.0140.00017.03
7.2.140.0080.01117.04
7.2.130.0070.00717.00
7.2.120.0060.01316.92
7.2.110.0120.00617.01
7.2.100.0030.01716.78
7.2.90.0130.00317.16
7.2.80.0100.00617.03
7.2.70.0090.00617.08
7.2.60.0110.00416.90
7.2.50.0060.01217.05
7.2.40.0030.01316.76
7.2.30.0150.00316.98
7.2.20.0070.00717.10
7.2.10.0070.01016.73
7.2.00.0070.00718.29
7.1.330.0000.01515.79
7.1.320.0040.01115.62
7.1.310.0030.01015.50
7.1.300.0060.00315.74
7.1.290.0030.01215.71
7.1.280.0130.00315.70
7.1.270.0070.00315.88
7.1.260.0140.00415.67
7.1.250.0030.01515.84
7.1.240.0040.01215.58
7.1.230.0040.01115.63
7.1.220.0090.00915.85
7.1.210.0030.01215.60
7.1.200.0060.00315.66
7.1.190.0080.00815.55
7.1.180.0070.00715.83
7.1.170.0100.00315.69
7.1.160.0030.01315.86
7.1.150.0060.00615.93
7.1.140.0040.01215.57
7.1.130.0080.00815.85
7.1.120.0060.00915.83
7.1.110.0070.00715.83
7.1.100.0090.00615.81
7.1.90.0030.01015.98
7.1.80.0030.00915.71
7.1.70.0050.00716.48
7.1.60.0050.01617.68
7.1.50.0120.01425.42
7.1.40.0040.01115.63
7.1.30.0000.01315.52
7.1.20.0000.01315.95
7.1.10.0060.00915.96
7.1.00.0020.04418.99
7.0.330.0030.01015.43
7.0.320.0070.00315.45
7.0.310.0030.01015.30
7.0.300.0030.01015.21
7.0.290.0070.00715.38
7.0.280.0120.00315.43
7.0.270.0070.00715.38
7.0.260.0060.00615.39
7.0.250.0090.00615.55
7.0.240.0060.00915.62
7.0.230.0070.00715.45
7.0.220.0000.01215.55
7.0.210.0040.00815.61
7.0.200.0030.00716.03
7.0.190.0000.00815.27
7.0.180.0070.00715.33
7.0.170.0070.01015.59
7.0.160.0000.01515.57
7.0.150.0090.00615.40
7.0.140.0110.03518.68
7.0.130.0090.00315.06
7.0.120.0070.00715.48
7.0.110.0030.00915.24
7.0.100.0050.04617.63
7.0.90.0050.03517.77
7.0.80.0070.04317.77
7.0.70.0240.04117.76
7.0.60.0220.02717.63
7.0.50.0200.04217.97
7.0.40.0110.01716.75
7.0.30.0030.02316.84
7.0.20.0050.05016.65
7.0.10.0060.02616.70
7.0.00.0070.02716.84
5.6.400.0080.00814.36
5.6.390.0060.01214.38
5.6.380.0070.00414.39
5.6.370.0090.00614.38
5.6.360.0000.01514.34
5.6.350.0070.00714.02
5.6.340.0000.01514.51
5.6.330.0060.00914.24
5.6.320.0060.01214.34
5.6.310.0030.01314.62
5.6.300.0110.00614.63
5.6.290.0000.01813.87
5.6.280.0050.04217.79
5.6.270.0060.00914.26
5.6.260.0080.00414.29
5.6.250.0030.02217.50
5.6.240.0030.02317.49
5.6.230.0050.02017.34
5.6.220.0050.04517.48
5.6.210.0080.03517.57
5.6.200.0110.03317.78
5.6.190.0030.02517.77
5.6.180.0080.03817.52
5.6.170.0130.03817.59
5.6.160.0120.03817.53
5.6.150.0120.01717.63
5.6.140.0030.03017.59
5.6.130.0050.04617.74
5.6.120.0030.02717.62
5.6.110.0030.02817.69
5.6.100.0080.02217.72
5.6.90.0040.02917.69
5.6.80.0050.02017.32
5.6.70.0060.02017.18
5.6.60.0070.01817.34
5.6.50.0030.02717.35
5.6.40.0040.02317.29
5.6.30.0050.02717.30
5.6.20.0070.02017.27
5.6.10.0080.03717.38
5.6.00.0040.02117.32
5.5.380.0080.03817.33
5.5.370.0060.02117.24
5.5.360.0110.04017.22
5.5.350.0050.03817.25
5.5.340.0050.04017.62
5.5.330.0090.04417.65
5.5.320.0050.04517.56
5.5.310.0050.03517.52
5.5.300.0080.02217.49
5.5.290.0100.04017.62
5.5.280.0030.02817.44
5.5.270.0030.02517.34
5.5.260.0030.02917.43
5.5.250.0070.02517.39
5.5.240.0050.02317.16
5.5.230.0070.01817.11
5.5.220.0020.02317.13
5.5.210.0030.03317.24
5.5.200.0090.01917.11
5.5.190.0050.02317.22
5.5.180.0080.02317.18
5.5.170.0030.01214.27
5.5.160.0030.02317.15
5.5.150.0020.02617.35
5.5.140.0090.02017.31
5.5.130.0090.02217.06
5.5.120.0060.02317.21
5.5.110.0050.02917.19
5.5.100.0050.02417.01
5.5.90.0060.02117.05
5.5.80.0030.02917.27
5.5.70.0070.02717.10
5.5.60.0050.02417.06
5.5.50.0070.02317.01
5.5.40.0060.04117.00
5.5.30.0050.04017.22
5.5.20.0030.04517.00
5.5.10.0110.01817.15
5.5.00.0060.02416.93
5.4.450.0080.01815.72
5.4.440.0020.02515.73
5.4.430.0030.02515.67
5.4.420.0070.02015.67
5.4.410.0050.01815.61
5.4.400.0050.02015.45
5.4.390.0020.02515.55
5.4.380.0040.02115.59
5.4.370.0090.02015.49
5.4.360.0050.02515.57
5.4.350.0030.03515.56
5.4.340.0030.02015.57
5.4.330.0040.00712.07
5.4.320.0020.02415.53
5.4.310.0050.01815.55
5.4.300.0080.02015.60
5.4.290.0070.02015.55
5.4.280.0030.02515.57
5.4.270.0030.02515.57
5.4.260.0050.02515.48
5.4.250.0050.02015.48
5.4.240.0020.02515.57
5.4.230.0050.02715.60
5.4.220.0070.02015.48
5.4.210.0120.02715.58
5.4.200.0070.03715.44
5.4.190.0100.02615.50
5.4.180.0030.04215.54
5.4.170.0050.04215.61
5.4.160.0060.03815.42
5.4.150.0060.03415.42
5.4.140.0030.03414.07
5.4.130.0050.02014.20
5.4.120.0000.04414.18
5.4.110.0070.03414.24
5.4.100.0030.02914.26
5.4.90.0020.04114.26
5.4.80.0020.02614.25
5.4.70.0050.04214.21
5.4.60.0100.02714.23
5.4.50.0050.03814.17
5.4.40.0030.03614.27
5.4.30.0070.03814.19
5.4.20.0050.02114.24
5.4.10.0050.04214.14
5.4.00.0070.03513.89
5.3.290.0020.03513.31
5.3.280.0050.02013.33
5.3.270.0080.03713.35
5.3.260.0060.03113.33
5.3.250.0060.04113.27
5.3.240.0050.02013.27
5.3.230.0020.04213.29
5.3.220.0040.02913.30
5.3.210.0030.02613.31
5.3.200.0070.03413.30
5.3.190.0000.03713.32
5.3.180.0030.02713.28
5.3.170.0070.03813.28
5.3.160.0030.04113.29
5.3.150.0070.03713.23
5.3.140.0080.04013.33
5.3.130.0030.03413.27
5.3.120.0070.03013.30
5.3.110.0060.03013.30
5.3.100.0050.04013.06
5.3.90.0030.04313.03
5.3.80.0060.03612.93
5.3.70.0030.03312.98
5.3.60.0050.04113.02
5.3.50.0060.03513.00
5.3.40.0000.02512.98
5.3.30.0080.03712.92
5.3.20.0050.03912.86
5.3.10.0050.04212.76
5.3.00.0050.04212.85

preferences:
41.04 ms | 401 KiB | 5 Q