3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkOGRN($ogrn){ if (strlen($ogrn) == 13) { $verify_num = intval(substr($ogrn, 0, 12)); $check_num = intval(substr($ogrn, -1)); $res_num = $verify_num % 11; if ($res_num > 9) $res_num - round($res_num/10)*10; if ($result == $check) return true; } elseif (strlen($ogrn) == 15) { $verify_num = intval(substr($ogrn, 0, 14)); $check_num = intval(substr($ogrn, -1)); $res_num = $verify_num % 13; if ($res_num > 9) $res_num = $res_num - round($res_num/10)*10; if ($result == $check) return true; } else return false; } print_r(checkOGRN('311333426300144'));

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)
5.4.310.3400.04318.95
5.4.300.3730.04718.87
5.4.290.3030.04019.22
5.4.280.2930.03719.09
5.4.270.2830.03719.21
5.4.260.3130.03319.16
5.4.250.3330.03018.86
5.4.240.2670.03719.13
5.4.230.2870.03318.85
5.4.220.3270.03019.22
5.4.210.2830.03319.07
5.4.200.3000.03319.13
5.4.190.2900.04019.13
5.4.180.2000.04018.86
5.4.170.0200.03319.23
5.4.160.0170.05718.97
5.4.150.0230.04718.96
5.4.140.0200.04716.50
5.4.130.0200.04016.66
5.4.120.0300.06316.29
5.4.110.0230.05016.45
5.4.100.0370.06316.28
5.4.90.0300.06316.55
5.4.80.0300.06716.56
5.4.70.0270.06316.52
5.4.60.0230.04016.54
5.4.50.0230.03316.43
5.4.40.0370.03716.52
5.4.30.0300.06316.51
5.4.20.0270.07016.53
5.4.10.0230.05716.21
5.4.00.0200.04716.11
5.3.290.3270.03314.74
5.3.280.2530.04014.57
5.3.270.0230.03314.58
5.3.260.0300.04314.52
5.3.250.0230.06714.60
5.3.240.0200.04314.63
5.3.230.0400.06014.68
5.3.220.0230.05314.48
5.3.210.0300.06314.54
5.3.200.0270.06714.73
5.3.190.0270.05714.48
5.3.180.0270.05314.79
5.3.170.0270.07014.47
5.3.160.0170.03714.47
5.3.150.0100.04714.72
5.3.140.0270.06714.68
5.3.130.0270.06714.47
5.3.120.0300.07014.71
5.3.110.0230.05314.55
5.3.100.0230.07714.03
5.3.90.0270.06013.96
5.3.80.0200.05013.92
5.3.70.0330.03713.93
5.3.60.0330.05314.16
5.3.50.0270.04313.88
5.3.40.0200.06714.05
5.3.30.0270.07313.82
5.3.20.0300.05713.64
5.3.10.0230.05013.88
5.3.00.0270.06713.64
5.2.170.0130.03711.38
5.2.160.0200.06011.20
5.2.150.0100.04311.06
5.2.140.0200.05311.14
5.2.130.0230.06011.27
5.2.120.0230.04311.01
5.2.110.0170.03311.02
5.2.100.0200.05711.08
5.2.90.0170.03311.23
5.2.80.0230.05011.11
5.2.70.0170.05011.02
5.2.60.0170.03011.05
5.2.50.0200.05710.93
5.2.40.0170.04010.96
5.2.30.0200.05311.09
5.2.20.0200.05010.88
5.2.10.0170.05310.84
5.2.00.0170.04310.68
5.1.60.0170.05010.38
5.1.50.0300.03710.38
5.1.40.0130.03310.38
5.1.30.0200.05310.42
5.1.20.0270.02310.38
5.1.10.0170.03710.38
5.1.00.0200.04710.38
5.0.50.0130.03710.38
5.0.40.0130.04010.38
5.0.30.0070.04710.38
5.0.20.0170.03710.38
5.0.10.0130.04310.38
5.0.00.0170.05010.38
4.4.90.0070.02310.38
4.4.80.0070.03310.38
4.4.70.0070.03010.38
4.4.60.0030.03010.38
4.4.50.0130.02710.38
4.4.40.0130.04710.38
4.4.30.0100.02310.38
4.4.20.0170.02710.38
4.4.10.0170.03010.38
4.4.00.0170.03310.38
4.3.110.0170.02010.38
4.3.100.0070.01710.38
4.3.90.0070.02710.38
4.3.80.0170.04010.38
4.3.70.0070.03010.38
4.3.60.0100.03310.38
4.3.50.0100.03310.38
4.3.40.0100.04010.38
4.3.30.0100.03310.38
4.3.20.0030.03710.38
4.3.10.0070.03010.38
4.3.00.0030.03310.38

preferences:
138.97 ms | 1394 KiB | 7 Q