3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * bool isEven(int $number) * * use it to prove if a number is even or no * * @param int $number the number that you want to check * @return bool returns TRUE if the number is even, otherwise returns FALSE */ function isEven($number) { if(!($number % 2)) { return TRUE; } return FALSE; } print_r(isEven(2)); echo '<br>'; print_r(isEven(3)); echo '<br>'; print_r(isEven(50)); echo '<br>'; print_r(isEven(53));

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.0000.01518.40
8.3.50.0100.01122.11
8.3.40.0100.00718.50
8.3.30.0110.00318.55
8.3.20.0000.00818.51
8.3.10.0000.00819.34
8.3.00.0070.00023.66
8.2.180.0000.01416.63
8.2.170.0040.01222.96
8.2.160.0030.01020.39
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00019.54
8.2.110.0100.00019.24
8.2.100.0060.00617.59
8.2.90.0020.00519.23
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0080.00017.91
8.2.50.0050.00318.07
8.2.40.0060.00318.22
8.2.30.0040.00421.27
8.2.20.0000.00717.46
8.2.10.0030.00617.61
8.2.00.0080.00017.61
8.1.270.0040.00423.99
8.1.260.0110.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00423.84
8.1.230.0080.00320.75
8.1.220.0030.00518.77
8.1.210.0000.00818.86
8.1.200.0030.00617.10
8.1.190.0030.00617.41
8.1.180.0070.00318.10
8.1.170.0040.00418.64
8.1.160.0000.00718.79
8.1.150.0040.00418.57
8.1.140.0040.00417.38
8.1.130.0000.00717.80
8.1.120.0050.00217.32
8.1.110.0030.00517.38
8.1.100.0040.00417.28
8.1.90.0030.00317.32
8.1.80.0040.00417.43
8.1.70.0030.00317.35
8.1.60.0090.00017.39
8.1.50.0050.00317.43
8.1.40.0030.00917.46
8.1.30.0050.00317.59
8.1.20.0050.00317.54
8.1.10.0040.00417.45
8.1.00.0040.00417.38
8.0.300.0000.01019.93
8.0.290.0050.00216.63
8.0.280.0030.00318.37
8.0.270.0080.00017.19
8.0.260.0030.00316.76
8.0.250.0000.01016.80
8.0.240.0070.00316.87
8.0.230.0000.00816.75
8.0.220.0080.00016.81
8.0.210.0050.00216.84
8.0.200.0030.00316.81
8.0.190.0040.00416.78
8.0.180.0040.00416.85
8.0.170.0000.00716.75
8.0.160.0000.00716.82
8.0.150.0050.00316.78
8.0.140.0000.00716.77
8.0.130.0000.00513.18
8.0.120.0000.00716.81
8.0.110.0040.00416.93
8.0.100.0030.00316.68
8.0.90.0070.00016.78
8.0.80.0000.01416.88
8.0.70.0000.00816.75
8.0.60.0040.00416.67
8.0.50.0040.00416.71
8.0.30.0060.01217.11
8.0.20.0080.01417.40
8.0.10.0040.00416.95
8.0.00.0080.00916.66
7.4.330.0050.00013.43
7.4.320.0000.00616.43
7.4.300.0000.00616.50
7.4.290.0050.00216.44
7.4.280.0070.00016.42
7.4.270.0030.00316.34
7.4.260.0050.00013.27
7.4.250.0060.00316.32
7.4.240.0040.00416.54
7.4.230.0070.00016.47
7.4.220.0150.00616.41
7.4.210.0050.01116.50
7.4.200.0070.00016.28
7.4.190.0030.00516.59
7.4.160.0080.00816.42
7.4.150.0150.00317.40
7.4.140.0150.00517.86
7.4.130.0070.01216.46
7.4.120.0050.01216.45
7.4.110.0130.00616.42
7.4.100.0090.00916.45
7.4.90.0130.00316.48
7.4.80.0070.01019.39
7.4.70.0060.01216.32
7.4.60.0100.00716.41
7.4.50.0000.00816.17
7.4.40.0060.00822.52
7.4.30.0090.01216.47
7.4.00.0030.01014.61
7.3.330.0050.00013.15
7.3.320.0000.00513.11
7.3.310.0000.00816.38
7.3.300.0070.00016.22
7.3.290.0160.00016.36
7.3.280.0110.00716.25
7.3.270.0100.00717.40
7.3.260.0120.00618.24
7.3.250.0090.01016.44
7.3.240.0090.00616.57
7.3.230.0160.00016.54
7.3.210.0130.00316.39
7.3.200.0160.00619.39
7.3.190.0160.00716.38
7.3.180.0120.00616.45
7.3.170.0030.01216.46
7.3.160.0130.00316.53
7.3.120.0040.00714.78
7.2.330.0070.01016.70
7.2.320.0130.01316.48
7.2.310.0120.00916.54
7.2.300.0080.00816.74
7.2.290.0100.00716.72
7.2.00.0070.00419.10
7.1.200.0060.00615.39
7.1.100.0030.00718.13
7.1.70.0030.00916.94
7.1.60.0090.01219.40
7.1.50.0090.00916.90
7.1.00.0030.04322.40
7.0.200.0030.00716.81
7.0.140.0000.07721.95
7.0.60.0130.07020.00
7.0.50.0100.07717.96
7.0.40.0130.08020.30
7.0.30.0300.07320.11
7.0.20.0270.05020.16
7.0.10.0070.04320.24
7.0.00.0070.05020.05
5.6.280.0030.06721.08
5.6.210.0130.07320.45
5.6.200.0100.07718.16
5.6.190.0030.08720.57
5.6.180.0370.06720.61
5.6.170.0300.07320.65
5.6.160.0030.04020.51
5.6.150.0070.05718.15
5.6.140.0070.05018.28
5.6.130.0130.07318.18
5.6.120.0030.04020.99
5.6.110.0070.07720.98
5.6.100.0070.06721.03
5.6.90.0100.08321.01
5.6.80.0070.03720.38
5.5.350.0400.06320.34
5.5.340.0070.05017.98
5.5.330.0170.07720.40
5.5.320.0100.05320.36
5.5.310.0270.04720.19
5.5.300.0070.04718.01
5.5.290.0030.04017.98
5.5.280.0070.08720.74
5.5.270.0000.07720.76
5.5.260.0100.03720.75
5.5.250.0030.05720.48
5.5.240.0100.07020.15
5.4.450.0070.06019.39
5.4.440.0130.07019.55
5.4.430.0130.05019.38
5.4.420.0270.05019.53
5.4.410.0100.07719.42
5.4.400.0030.07319.21
5.4.390.0070.07719.31
5.4.380.0030.05719.00
5.4.370.0230.07019.12
5.4.360.0100.04319.20
5.4.350.0070.04719.22
5.4.340.0200.03719.21
5.4.320.0300.04019.17
5.4.310.0130.06319.12
5.4.300.0270.07718.88
5.4.290.0100.05718.94
5.4.280.0230.05018.84
5.4.270.0100.04318.98
5.4.260.0200.07319.19
5.4.250.0170.04718.86
5.4.240.0230.06019.21
5.4.230.0270.04718.97
5.4.220.0270.06719.11
5.4.210.0270.05018.83
5.4.200.0300.07018.86
5.4.190.0330.05718.98
5.4.180.0430.06719.05
5.4.170.0330.04318.83
5.4.160.0330.05019.14
5.4.150.0370.02318.85
5.4.140.0300.03316.42
5.4.130.0300.04716.43
5.4.120.0230.03716.46
5.4.110.0330.07016.56
5.4.100.0370.06716.25
5.4.90.0430.05716.36
5.4.80.0430.03316.18
5.4.70.0330.05016.54
5.4.60.0230.07016.38
5.4.50.0200.05716.55
5.4.40.0270.06016.25
5.4.30.0070.07716.51
5.4.20.0170.04316.32
5.4.10.0170.05016.32
5.4.00.0200.07315.84
5.3.290.0330.07014.80
5.3.280.0330.05714.49
5.3.270.0230.05714.61
5.3.260.0300.07014.61
5.3.250.0270.05014.71
5.3.240.0370.06714.52
5.3.230.0300.05014.82
5.3.220.0230.04314.56
5.3.210.0330.03714.56
5.3.200.0370.06314.48
5.3.190.0370.03714.65
5.3.180.0270.04014.70
5.3.170.0430.06714.56
5.3.160.0300.04714.43
5.3.150.0330.07014.57
5.3.140.0500.02714.55
5.3.130.0230.04314.55
5.3.120.0300.07014.60
5.3.110.0230.07314.51
5.3.100.0270.05014.00
5.3.90.0370.06714.24
5.3.80.0300.04013.94
5.3.70.0230.04014.07
5.3.60.0470.04014.01
5.3.50.0470.06014.08
5.3.40.0430.06713.92
5.3.30.0370.06013.86
5.3.20.0300.04313.92
5.3.10.0400.03013.90
5.3.00.0300.04013.56
5.2.170.0200.03012.34
5.2.160.0370.03012.34
5.2.150.0230.04012.34
5.2.140.0100.03312.34
5.2.130.0170.04312.34
5.2.120.0130.02312.34
5.2.110.0170.05712.34
5.2.100.0330.05012.34
5.2.90.0370.02312.34
5.2.80.0330.04712.34
5.2.70.0200.06012.34
5.2.60.0370.05012.34
5.2.50.0300.05312.34
5.2.40.0200.06012.34
5.2.30.0200.04312.34
5.2.20.0300.05312.34
5.2.10.0330.04312.34
5.2.00.0100.05712.34
5.1.60.0000.05312.34
5.1.50.0100.03012.34
5.1.40.0030.03012.34
5.1.30.0100.05312.34
5.1.20.0200.02312.34
5.1.10.0200.02712.34
5.1.00.0170.02712.34
5.0.50.0100.04012.34
5.0.40.0170.04012.34
5.0.30.0130.03012.34
5.0.20.0100.02312.34
5.0.10.0170.01712.34
5.0.00.0130.03012.34
4.4.90.0130.01012.34
4.4.80.0130.01312.34
4.4.70.0170.02012.34
4.4.60.0000.01712.34
4.4.50.0100.01012.34
4.4.40.0030.02712.34
4.4.30.0030.01712.34
4.4.20.0100.02712.34
4.4.10.0030.01312.34
4.4.00.0000.05012.34
4.3.110.0100.02712.34
4.3.100.0030.02012.34
4.3.90.0000.03312.34
4.3.80.0000.04312.34
4.3.70.0000.02712.34
4.3.60.0030.02712.34
4.3.50.0030.02712.34
4.3.40.0030.03012.34
4.3.30.0030.02012.34
4.3.20.0030.03712.34
4.3.10.0130.03012.34
4.3.00.0000.03712.34

preferences:
48.25 ms | 400 KiB | 5 Q