3v4l.org

run code in 300+ PHP versions simultaneously
<?php $status = 2; //if ($status >> 2 & 0x1 == 1) { // $statustext = "Høj temp. alarm"; //} else if ($status >> 1 & 0x1 == 1) { // $statustext = "Lav temp. alarm"; //} else if ($status >> 0 & 0x1 == 1) { // $statustext = "OK"; //} else { // sensor error // $statustext = "Føler fejl"; //} if (($status & 0x1) == 0) { $statustext = "Føler fejl"; } else if (($status >> 3 & 0x1) > 0) { $statustext = "Føler batteri lavt niveau"; } else if (($status >> 2 & 0x1) > 0) { $statustext = "Høj temp. alarm"; } else if (($status >> 1 & 0x1) > 0) { $statustext = "Lav temp. alarm"; } else { // sensor OK $statustext = "OK"; } echo $statustext;

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.0170.00316.38
8.3.50.0000.01516.05
8.3.40.0180.00018.78
8.3.30.0110.00818.52
8.3.20.0080.00021.92
8.3.10.0040.00423.53
8.3.00.0080.00023.65
8.2.180.0100.01016.38
8.2.170.0070.00722.96
8.2.160.0070.00720.45
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00822.26
8.2.120.0080.00026.35
8.2.110.0080.00021.12
8.2.100.0090.00317.74
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0040.00417.38
8.2.60.0090.00017.80
8.2.50.0080.00018.10
8.2.40.0040.00422.18
8.2.30.0030.00521.05
8.2.20.0000.00718.17
8.2.10.0040.00418.12
8.2.00.0040.00418.04
8.1.280.0110.00425.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00322.66
8.1.230.0040.00717.64
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00817.23
8.1.190.0050.00317.51
8.1.180.0060.00318.10
8.1.170.0040.00418.57
8.1.160.0070.00018.86
8.1.150.0050.00318.80
8.1.140.0040.00417.61
8.1.130.0040.00418.95
8.1.120.0000.00717.53
8.1.110.0000.00917.46
8.1.100.0000.00917.46
8.1.90.0040.00417.41
8.1.80.0050.00317.31
8.1.70.0020.00517.32
8.1.60.0040.00417.54
8.1.50.0000.00817.49
8.1.40.0050.00317.59
8.1.30.0040.00417.60
8.1.20.0080.00017.48
8.1.10.0080.00017.48
8.1.00.0080.00017.32
8.0.300.0040.00418.78
8.0.290.0040.00416.63
8.0.280.0070.00018.48
8.0.270.0000.00717.13
8.0.260.0060.00016.76
8.0.250.0000.00616.83
8.0.240.0030.00316.95
8.0.230.0030.00316.89
8.0.220.0000.00716.70
8.0.210.0030.00316.84
8.0.200.0060.00016.86
8.0.190.0000.00716.86
8.0.180.0040.00416.83
8.0.170.0040.00416.75
8.0.160.0040.00416.91
8.0.150.0000.00716.76
8.0.140.0070.00016.78
8.0.130.0050.00013.27
8.0.120.0040.00416.80
8.0.110.0040.00416.89
8.0.100.0050.00216.88
8.0.90.0020.00516.77
8.0.80.0070.00716.88
8.0.70.0070.00016.80
8.0.60.0030.00516.90
8.0.50.0000.00716.92
8.0.30.0090.00917.16
8.0.20.0120.00817.40
8.0.10.0070.00016.85
8.0.00.0100.00716.75
7.4.330.0020.00216.75
7.4.320.0000.00716.52
7.4.300.0030.00316.59
7.4.290.0030.00316.45
7.4.280.0040.00716.57
7.4.270.0030.00316.44
7.4.260.0040.00416.48
7.4.250.0040.00416.61
7.4.240.0050.00316.55
7.4.230.0030.00316.51
7.4.220.0080.01116.58
7.4.210.0070.00816.38
7.4.200.0030.00316.68
7.4.160.0090.00716.55
7.4.150.0120.01217.40
7.4.140.0130.00717.86
7.4.130.0140.01016.44
7.4.120.0120.00616.59
7.4.110.0060.01016.42
7.4.100.0040.01216.42
7.4.90.0030.01316.57
7.4.80.0150.00619.39
7.4.70.0140.00316.65
7.4.60.0160.00316.43
7.4.50.0040.01116.56
7.4.40.0120.00616.48
7.4.30.0050.01316.46
7.4.00.0100.00714.70
7.3.330.0060.00013.17
7.3.320.0000.00613.09
7.3.310.0030.00316.13
7.3.300.0030.00316.28
7.3.290.0090.00716.28
7.3.280.0070.00916.26
7.3.270.0120.00617.40
7.3.260.0120.00516.40
7.3.250.0110.00916.38
7.3.240.0120.00616.42
7.3.230.0070.01016.26
7.3.210.0150.00316.43
7.3.200.0100.00716.28
7.3.190.0040.01216.29
7.3.180.0030.01616.30
7.3.170.0100.00616.46
7.3.160.0050.01116.27
7.3.10.0060.00816.49
7.3.00.0080.00616.52
7.2.330.0110.00816.65
7.2.320.0060.01016.70
7.2.310.0060.01616.37
7.2.300.0060.01416.45
7.2.290.0110.01416.51
7.2.130.0090.00616.64
7.2.120.0080.00516.81
7.2.110.0070.00716.70
7.2.100.0030.00816.87
7.2.90.0060.00917.00
7.2.80.0040.01316.70
7.2.70.0070.00816.83
7.2.60.0050.00716.80
7.2.50.0060.00716.62
7.2.40.0040.01116.82
7.2.30.0060.00716.80
7.2.20.0010.01216.95
7.2.10.0080.00616.92
7.2.00.0030.01016.85
7.1.250.0050.00915.67
7.1.200.0030.00915.91
7.1.110.0070.01017.82
7.1.100.0040.00718.34
7.1.90.0060.00818.24
7.1.80.0030.00918.09
7.1.70.0000.01516.87
7.1.60.0160.01235.17
7.1.50.0170.01334.50
7.1.40.0140.01434.33
7.1.30.0150.01234.38
7.1.20.0140.01434.52
7.1.10.0080.00516.40
7.1.00.0030.01316.52
7.0.250.0060.00617.42
7.0.240.0040.00817.56
7.0.230.0030.01217.70
7.0.220.0000.01317.75
7.0.210.0000.01216.50
7.0.200.0000.01316.63
7.0.190.0060.00916.82
7.0.180.0070.01316.31
7.0.170.0070.00716.14
7.0.160.0090.00416.11
7.0.150.0000.01116.26
7.0.140.0030.00916.34
7.0.130.0000.01116.60
7.0.120.0080.00816.35
7.0.110.0070.01016.24
7.0.100.0040.01316.34
7.0.90.0030.00916.31
7.0.80.0040.00816.20
7.0.70.0060.00616.31
7.0.60.0030.01415.97
7.0.50.0000.01316.37
7.0.40.0030.01216.46
7.0.30.0060.00816.55
7.0.20.0030.00916.48
7.0.10.0030.00916.29
7.0.00.0060.00616.22

preferences:
73.9 ms | 400 KiB | 5 Q