3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Created by PhpStorm. * User: efik * Date: 20.09.16 * Time: 13:40 */ ///////////////////////// TEST ////////////////// $_POST = [ 'napoj' => 'herbata', 'name' => 'Krzysi', 'second_name' => 'dd' ]; $_SERVER["REQUEST_METHOD"] = 'POST'; /////////////////////// KONIEC DANYCH TESTOWYCH ///////// if($_SERVER["REQUEST_METHOD"] !== "POST") { exit; } if(!(['faktura', 'napoj', 'name', 'second_name'] === array_keys($_POST))){ echo "Wszystkie pola muszą być wypełnione! <br>"; exit; } $faktura = $_POST['faktura'] == 'on' ? 'Tak' : 'Nie'; $napoj = $_POST['napoj']; $name = $_POST['name']; $secondName = $_POST['second_name']; $orderDate = (new DateTime())->format("H:i, Y-m-d"); echo "Imie: {$name} <br>"; echo "Nazwisko: {$secondName} <br>"; echo "Faktura: {$faktura}<br>"; echo "Zamówienie: "; switch($napoj) { case 'herbata': echo "herabata"; break; case 'kawa': echo "herabata"; break; case 'pepsi': echo "herabata"; break; case 'woda mineralna': echo "woda mineralna"; break; } echo "<br>"; echo "Zamówienie złożone: {$orderDate} ";

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.130.0050.00318.72
8.3.120.0040.00420.99
8.3.110.0080.00020.94
8.3.100.0090.00024.06
8.3.90.0030.00626.77
8.3.80.0090.00319.36
8.3.70.0090.01216.49
8.3.60.0040.01116.63
8.3.50.0110.01021.26
8.3.40.0100.00718.71
8.3.30.0060.00919.02
8.3.20.0000.00920.20
8.3.10.0050.00320.71
8.3.00.0040.00420.60
8.2.250.0040.00418.50
8.2.240.0000.00817.34
8.2.230.0000.00822.58
8.2.220.0000.00937.54
8.2.210.0040.00826.77
8.2.200.0080.00018.88
8.2.190.0090.00918.45
8.2.180.0070.01318.16
8.2.170.0100.01022.96
8.2.160.0040.01119.26
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0000.00819.61
8.2.110.0060.00320.53
8.2.100.0110.00019.64
8.2.90.0000.00817.97
8.2.80.0060.00320.36
8.2.70.0040.00417.93
8.2.60.0080.00018.04
8.2.50.0030.00518.10
8.2.40.0050.00320.65
8.2.30.0000.00719.39
8.2.20.0000.00818.14
8.2.10.0040.00418.04
8.2.00.0040.00417.79
8.1.300.0130.00316.51
8.1.290.0000.00930.84
8.1.280.0090.00625.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00023.96
8.1.230.0060.00620.86
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0030.00517.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0040.00420.60
8.1.160.0070.00022.20
8.1.150.0000.00818.96
8.1.140.0040.00419.63
8.1.130.0030.00317.72
8.1.120.0000.00717.39
8.1.110.0000.00817.41
8.1.100.0040.00417.45
8.1.90.0080.00017.48
8.1.80.0040.00417.30
8.1.70.0070.00017.45
8.1.60.0000.00717.63
8.1.50.0030.00517.60
8.1.40.0030.00517.47
8.1.30.0000.00817.70
8.1.20.0030.00617.71
8.1.10.0040.00417.50
8.1.00.0000.00817.58
8.0.300.0080.00020.05
8.0.290.0040.00416.88
8.0.280.0000.00818.46
8.0.270.0070.00017.29
8.0.260.0060.00017.51
8.0.250.0070.00017.05
8.0.240.0040.00417.02
8.0.230.0030.00416.89
8.0.220.0070.00016.91
8.0.210.0040.00416.88
8.0.200.0000.00617.04
8.0.190.0030.00617.10
8.0.180.0040.00416.96
8.0.170.0000.00816.88
8.0.160.0030.00316.89
8.0.150.0000.00716.87
8.0.140.0040.00416.89
8.0.130.0060.00013.43
8.0.120.0040.00416.84
8.0.110.0000.00716.80
8.0.100.0000.00817.03
8.0.90.0030.00616.84
8.0.80.0090.00616.93
8.0.70.0100.00016.96
8.0.60.0000.00816.82
8.0.50.0050.00216.81
8.0.30.0120.00517.20
8.0.20.0120.00917.40
8.0.10.0040.00416.88
8.0.00.0060.01016.81
7.4.330.0000.00515.08
7.4.320.0030.00316.50
7.4.300.0000.00616.51
7.4.290.0000.00716.56
7.4.280.0040.00416.65
7.4.270.0030.00316.67
7.4.260.0040.00716.50
7.4.250.0070.00016.43
7.4.240.0040.00416.63
7.4.230.0040.00416.46
7.4.220.0060.01016.54
7.4.210.0080.00816.64
7.4.200.0030.00516.64
7.4.160.0080.00816.53
7.4.150.0140.00817.40
7.4.140.0100.00717.86
7.4.130.0060.01116.62
7.4.120.0080.01016.51
7.4.110.0130.00316.52
7.4.100.0030.01316.45
7.4.90.0120.00416.55
7.4.80.0100.01119.39
7.4.70.0150.00716.55
7.4.60.0170.00016.58
7.4.50.0100.00316.38
7.4.40.0030.01416.63
7.4.30.0060.01616.66
7.4.00.0040.01115.08
7.3.330.0030.00313.08
7.3.320.0050.00013.20
7.3.310.0030.00316.44
7.3.300.0000.00716.39
7.3.290.0080.00716.33
7.3.280.0090.00816.34
7.3.270.0070.01017.40
7.3.260.0080.00916.54
7.3.250.0080.01016.39
7.3.240.0090.00916.38
7.3.230.0210.00316.48
7.3.210.0070.01016.39
7.3.200.0170.00316.43
7.3.190.0080.00816.45
7.3.180.0030.01416.45
7.3.170.0060.01016.34
7.3.160.0090.00716.43
7.3.10.0070.01016.59
7.3.00.0090.00516.50
7.2.330.0160.00616.61
7.2.320.0090.01516.72
7.2.310.0100.00716.63
7.2.300.0140.00916.48
7.2.290.0140.00316.79
7.2.130.0110.00816.85
7.2.120.0080.00816.87
7.2.110.0050.01016.94
7.2.100.0070.01016.83
7.2.90.0060.00716.83
7.2.80.0100.00716.96
7.2.70.0100.01016.67
7.2.60.0080.00616.92
7.2.50.0030.01116.82
7.2.40.0060.01016.78
7.2.30.0110.00316.94
7.2.20.0090.00716.86
7.2.10.0080.00416.92
7.2.00.0100.00616.81
7.1.250.0070.00915.67
7.1.240.0070.00715.60
7.1.230.0100.00315.80
7.1.220.0130.00015.51
7.1.210.0060.00615.95
7.1.200.0100.00015.81
7.1.190.0040.00815.56
7.1.180.0080.00415.86
7.1.170.0040.01115.81
7.1.160.0040.00715.79
7.1.150.0030.00915.86
7.1.140.0140.00015.48
7.1.130.0060.00315.80
7.1.120.0030.00715.71
7.1.110.0060.00615.66
7.1.100.0110.00015.88
7.1.90.0040.00715.74
7.1.80.0000.01415.72
7.1.70.0090.00416.52
7.1.60.0060.00616.25
7.1.50.0030.01015.79
7.1.40.0000.01015.84
7.1.30.0060.00915.80
7.1.20.0000.00915.77
7.1.10.0050.00315.63
7.1.00.0040.04018.92
7.0.330.0070.00315.27
7.0.320.0080.00415.39
7.0.310.0000.01215.22
7.0.300.0030.01015.21
7.0.290.0110.00015.01
7.0.280.0140.00015.40
7.0.270.0130.00015.42
7.0.260.0060.00615.29
7.0.250.0000.01015.47
7.0.240.0000.01315.15
7.0.230.0060.00615.38
7.0.220.0040.01115.55
7.0.210.0080.00315.37
7.0.200.0190.00415.00
7.0.190.0080.00315.26
7.0.180.0000.00915.56
7.0.170.0050.00515.16
7.0.160.0040.00715.41
7.0.150.0030.01015.13
7.0.140.0060.00615.43
7.0.130.0060.00315.55
7.0.120.0000.01015.64
7.0.110.0030.03417.95
7.0.100.0070.03217.94
7.0.90.0180.03417.85
7.0.80.0180.04517.95
7.0.70.0110.04317.85
7.0.60.0220.03317.69
7.0.50.0270.02517.92
7.0.40.0260.03916.87
7.0.30.0290.02816.81
7.0.20.0220.03416.64
7.0.10.0090.03616.72
7.0.00.0250.03016.75
5.6.380.0060.00914.47
5.6.370.0070.00314.63
5.6.360.0030.00614.48
5.6.350.0030.00814.37
5.6.340.0060.00314.55
5.6.330.0030.00914.68
5.6.320.0030.00714.04
5.6.310.0110.00014.69
5.6.300.0070.00314.60
5.6.290.0030.01014.66
5.6.280.0030.00714.50
5.6.270.0090.00614.27
5.6.260.0070.03417.67
5.6.250.0070.04217.70
5.6.240.0150.02817.59
5.6.230.0050.04017.66
5.6.220.0100.03417.64
5.6.210.0030.03517.74
5.6.200.0090.03017.66
5.6.190.0110.02817.69
5.6.180.0070.03317.84
5.6.170.0070.03517.60
5.6.160.0070.03217.63
5.6.150.0120.02717.88
5.6.140.0110.02717.59
5.6.130.0140.02317.64
5.6.120.0090.03117.79
5.6.110.0110.03017.85
5.6.100.0060.04017.63
5.6.90.0070.03117.82
5.6.80.0090.02717.36
5.6.70.0000.03617.42
5.6.60.0120.02817.26
5.6.50.0080.02817.38
5.6.40.0120.02617.21
5.6.30.0100.02817.21
5.6.20.0150.02517.28
5.6.10.0150.02817.28
5.6.00.0070.03117.20

preferences:
27.2 ms | 403 KiB | 5 Q