3v4l.org

run code in 300+ PHP versions simultaneously
<?php $diagnoses = ['Здоров', 'ОРЗ', 'ОРВИ']; $diagnosisNumber = array_rand($diagnoses); $diagnosis = $diagnoses[$diagnosisNumber]; if ($diagnosisNumber) { if (rand(1,100) === 42) {//Jackpot $diagnosis .= ' + Больничный на 2 дня!'; } } echo $diagnosis; echo '';

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.0060.01215.04
7.4.00.0130.00614.94
7.3.130.0100.01014.72
7.3.120.0110.00614.89
7.3.110.0080.00814.74
7.3.100.0100.00114.67
7.3.90.0070.00614.82
7.3.80.0050.00614.90
7.3.70.0040.00814.67
7.3.60.0050.00814.72
7.3.50.0060.00714.64
7.3.40.0020.01014.88
7.3.30.0030.00814.80
7.3.20.0030.00916.65
7.3.10.0090.00416.63
7.3.00.0050.00516.76
7.2.260.0000.01515.17
7.2.250.0030.01614.87
7.2.240.0090.00915.03
7.2.230.0020.01215.10
7.2.220.0070.00714.90
7.2.210.0020.00915.09
7.2.200.0080.00415.14
7.2.190.0070.00914.74
7.2.180.0050.00714.93
7.2.170.0080.00615.08
7.2.160.0050.01014.76
7.2.150.0000.01316.93
7.2.140.0030.01016.61
7.2.130.0050.00916.95
7.2.120.0070.00616.76
7.2.110.0050.00716.88
7.2.100.0050.00916.88
7.2.90.0050.00816.92
7.2.80.0050.00816.85
7.2.70.0090.00716.96
7.2.60.0080.00516.81
7.2.50.0030.00816.82
7.2.40.0090.00716.99
7.2.30.0050.00716.91
7.2.20.0060.00616.77
7.2.10.0070.00616.97
7.2.00.0040.00716.77
7.1.330.0060.01015.89
7.1.320.0070.00515.81
7.1.310.0030.01115.91
7.1.300.0050.00915.84
7.1.290.0060.00715.60
7.1.280.0020.00915.76
7.1.270.0030.00515.70
7.1.260.0040.00715.52
7.1.250.0030.00815.62
7.1.240.0090.00315.82
7.1.230.0090.00315.90
7.1.220.0060.00615.84
7.1.210.0060.00915.93
7.1.200.0030.01015.51
7.1.190.0000.01315.71
7.1.180.0040.00715.87
7.1.170.0000.01415.95
7.1.160.0060.00815.73
7.1.150.0040.01215.81
7.1.140.0050.00815.74
7.1.130.0120.00315.69
7.1.120.0030.00615.78
7.1.110.0000.01416.06
7.1.100.0070.00715.84
7.1.90.0030.00715.86
7.1.80.0030.01016.00
7.1.70.0080.00816.39
7.1.60.0090.00716.54
7.1.50.0090.00516.33
7.1.40.0060.00315.85
7.1.30.0060.00315.90
7.1.20.1050.03526.86
7.1.10.0250.03117.99
7.1.00.0280.02818.15
7.0.330.0040.01115.52
7.0.320.0080.00715.43
7.0.310.0040.00815.32
7.0.300.0070.00715.20
7.0.290.0070.00715.38
7.0.280.0070.00715.29
7.0.270.0120.00315.34
7.0.260.0000.01115.09
7.0.250.0030.01015.49
7.0.240.0070.00315.46
7.0.230.0060.00615.41
7.0.220.0030.01015.34
7.0.210.0040.00715.23
7.0.200.0070.00816.07
7.0.190.0080.00015.51
7.0.180.0060.00615.46
7.0.170.0070.00715.43
7.0.160.0270.03017.52
7.0.150.0200.03517.74
7.0.140.0290.03217.79
7.0.130.0240.03117.79
7.0.120.0270.03317.61
7.0.110.0180.03617.72
7.0.100.0260.02717.71
7.0.90.0250.03317.71
7.0.80.0230.03317.83
7.0.70.0170.03517.81
7.0.60.0340.02817.60
7.0.50.0200.03317.77
7.0.40.0180.03516.66
7.0.30.0300.02316.62
7.0.20.0240.02916.69
7.0.10.0280.02816.71
7.0.00.0630.03516.84
5.6.400.0040.00414.50
5.6.390.0030.01014.48
5.6.380.0070.01014.51
5.6.370.0040.00714.77
5.6.360.0070.01014.15
5.6.350.0060.01014.26
5.6.340.0060.00914.12
5.6.330.0100.00314.48
5.6.320.0030.01014.64
5.6.310.0070.00414.11
5.6.300.0040.01114.23
5.6.290.0080.00314.11
5.6.280.0070.00714.34
5.6.270.0100.00714.21
5.6.260.0090.00914.27
5.6.250.0120.00614.31
5.6.240.0090.00614.37
5.6.230.0030.01014.49
5.6.220.0090.00614.07
5.6.210.0110.00614.26
5.6.200.0040.01214.36
5.6.190.0060.00614.23
5.6.180.0070.00414.18
5.6.170.0030.01014.43
5.6.160.0000.01714.32
5.6.150.0030.01014.32
5.6.140.0060.01014.57
5.6.130.0040.01114.32
5.6.120.0070.00714.36
5.6.110.0040.00414.20
5.6.100.0030.01014.24
5.6.90.0050.00514.16
5.6.80.0080.00413.88
5.6.70.0100.00314.30
5.6.60.0030.01014.41
5.6.50.0000.01414.10
5.6.40.0040.00714.33
5.6.30.0000.00914.44
5.6.20.0000.01614.36
5.6.10.0030.00614.55
5.6.00.0060.00914.28

preferences:
33.64 ms | 400 KiB | 5 Q