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 - 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)
8.3.40.0070.00718.58
8.3.30.0060.00819.09
8.3.20.0050.00320.18
8.3.10.0000.00723.66
8.3.00.0080.00019.38
8.2.170.0110.00422.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0120.00626.16
8.2.120.0070.00020.96
8.2.110.0030.00620.94
8.2.100.0110.00017.97
8.2.90.0060.00318.03
8.2.80.0060.00318.16
8.2.70.0000.00917.63
8.2.60.0040.00417.63
8.2.50.0050.00317.63
8.2.40.0030.00517.93
8.2.30.0030.00917.93
8.2.20.0000.00717.75
8.2.10.0000.00717.99
8.2.00.0050.00217.75
8.1.270.0030.00723.83
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00923.80
8.1.230.0060.00620.88
8.1.220.0100.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0060.00317.23
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0070.00022.11
8.1.150.0040.00418.79
8.1.140.0040.00417.44
8.1.130.0000.00717.86
8.1.120.0040.00417.48
8.1.110.0040.00717.38
8.1.100.0020.00517.45
8.1.90.0000.00717.46
8.1.80.0070.00017.46
8.1.70.0000.00717.32
8.1.60.0060.00317.60
8.1.50.0030.00617.51
8.1.40.0030.00517.41
8.1.30.0060.00317.75
8.1.20.0000.00717.64
8.1.10.0000.00817.51
8.1.00.0000.00717.44
8.0.300.0000.00719.90
8.0.290.0070.00016.88
8.0.280.0070.00018.50
8.0.270.0070.00017.25
8.0.260.0070.00017.25
8.0.250.0000.00716.91
8.0.240.0000.00817.03
8.0.230.0040.00416.98
8.0.220.0000.00716.99
8.0.210.0030.00316.86
8.0.200.0040.00416.98
8.0.190.0000.00717.06
8.0.180.0080.00017.04
8.0.170.0040.00417.01
8.0.160.0040.00416.99
8.0.150.0040.00416.93
8.0.140.0040.00816.93
8.0.130.0000.00613.39
8.0.120.0000.00716.91
8.0.110.0000.00716.82
8.0.100.0000.00716.89
8.0.90.0030.00516.89
8.0.80.0110.00616.93
8.0.70.0040.00416.89
8.0.60.0000.00716.85
8.0.50.0040.00416.80
8.0.30.0110.00817.11
8.0.20.0040.01517.40
8.0.10.0040.00416.95
8.0.00.0060.01116.79
7.4.330.0020.00215.02
7.4.320.0000.00616.47
7.4.300.0030.00316.46
7.4.290.0030.00316.66
7.4.280.0040.00416.50
7.4.270.0040.00416.61
7.4.260.0030.00616.58
7.4.250.0000.00916.54
7.4.240.0020.00516.50
7.4.230.0070.00016.58
7.4.220.0090.00916.59
7.4.210.0100.00416.54
7.4.200.0030.00516.45
7.4.160.0070.01016.57
7.4.150.0150.00317.40
7.4.140.0110.00717.86
7.4.130.0070.00916.54
7.4.120.0120.00416.67
7.4.110.0070.01016.65
7.4.100.0060.01416.45
7.4.90.0070.01016.59
7.4.80.0090.01019.39
7.4.70.0140.00616.65
7.4.60.0080.00816.39
7.4.50.0030.00616.32
7.4.40.0000.01816.52
7.4.30.0080.00816.28
7.4.00.0090.00815.09
7.3.330.0000.00513.50
7.3.320.0030.00313.37
7.3.310.0050.00216.32
7.3.300.0000.00716.38
7.3.290.0090.00916.45
7.3.280.0120.00516.44
7.3.270.0170.00717.40
7.3.260.0170.00716.54
7.3.250.0120.00916.59
7.3.240.0090.00916.62
7.3.230.0120.00416.74
7.3.210.0060.01216.61
7.3.200.0110.00419.39
7.3.190.0070.01116.33
7.3.180.0100.00716.44
7.3.170.0200.02616.38
7.3.160.0160.00616.39
7.3.120.0140.00414.99
7.3.110.0060.01314.93
7.3.100.0060.01014.78
7.3.90.0040.01114.86
7.3.80.0000.01014.92
7.3.70.0040.00414.78
7.3.60.0000.01515.04
7.3.50.0040.01114.96
7.3.40.0030.01414.62
7.3.30.0080.00414.61
7.3.20.0090.00316.57
7.3.10.0050.00716.73
7.3.00.0040.00816.65
7.2.330.0060.01116.73
7.2.320.0180.00416.69
7.2.310.0170.00616.36
7.2.300.0070.01016.77
7.2.290.0120.00316.45
7.2.250.0090.00315.26
7.2.240.0000.02114.70
7.2.230.0030.01015.05
7.2.220.0040.01114.87
7.2.210.0070.00714.68
7.2.200.0000.01514.96
7.2.190.0080.00415.12
7.2.180.0000.00914.87
7.2.170.0030.01415.00
7.2.160.0080.00814.98
7.2.150.0090.00316.87
7.2.140.0060.00316.87
7.2.130.0070.00716.93
7.2.120.0040.00816.92
7.2.110.0050.00616.74
7.2.100.0020.01216.82
7.2.90.0000.01316.89
7.2.80.0020.00916.82
7.2.70.0040.00716.99
7.2.60.0050.00616.98
7.2.50.0050.01016.97
7.2.40.0080.00316.74
7.2.30.0070.00716.81
7.2.20.0040.00916.60
7.2.10.0090.00516.72
7.2.00.0040.00716.80
7.1.330.0030.01415.94
7.1.320.0060.00915.91
7.1.310.0050.00515.93
7.1.300.0040.00715.74
7.1.290.0040.01115.91
7.1.280.0040.01115.83
7.1.270.0040.01115.77
7.1.260.0070.00315.82
7.1.250.0070.00715.82
7.1.240.0000.01315.64
7.1.230.0040.00715.71
7.1.220.0000.01215.87
7.1.210.0000.00915.64
7.1.200.0060.00615.66
7.1.190.0110.00415.88
7.1.180.0080.00615.69
7.1.170.0080.00415.83
7.1.160.0000.01215.93
7.1.150.0070.00715.81
7.1.140.0060.00615.93
7.1.130.0070.00715.83
7.1.120.0040.00415.69
7.1.110.0060.00615.97
7.1.100.0070.00715.92
7.1.90.0030.00915.96
7.1.80.0070.00315.55
7.1.70.0050.00616.40
7.1.60.0080.01117.67
7.1.50.0070.01316.12
7.1.40.0030.01215.87
7.1.30.0030.01015.88
7.1.20.0030.00715.54
7.1.10.0000.01415.77
7.1.00.0050.04319.04
7.0.330.0110.00715.46
7.0.320.0090.00015.39
7.0.310.0030.00615.45
7.0.300.0090.00615.42
7.0.290.0090.00315.21
7.0.280.0100.00315.42
7.0.270.0030.01015.15
7.0.260.0080.00415.49
7.0.250.0060.01015.55
7.0.240.0100.00315.36
7.0.230.0090.00015.58
7.0.220.0060.00915.57
7.0.210.0070.00715.48
7.0.200.0070.00316.09
7.0.190.0040.01115.39
7.0.180.0100.00615.49
7.0.170.0100.00015.35
7.0.160.0060.00615.43
7.0.150.0000.01015.39
7.0.140.0050.03818.73
7.0.130.0040.01115.63
7.0.120.0060.00315.61
7.0.110.0060.00315.57
7.0.100.0060.01015.41
7.0.90.0080.00015.59
7.0.80.0030.01315.48
7.0.70.0130.00015.20
7.0.60.0020.04717.52
7.0.50.0020.03616.81
7.0.40.0070.04616.94
7.0.30.0270.02316.79
7.0.20.0180.04316.68
7.0.10.0070.03716.69
7.0.00.0030.04716.78
5.6.400.0030.00614.54
5.6.390.0040.01214.48
5.6.380.0040.00714.38
5.6.370.0070.00314.30
5.6.360.0040.00714.58
5.6.350.0050.00514.55
5.6.340.0060.00614.51
5.6.330.0070.00414.64
5.6.320.0120.00313.94
5.6.310.0030.00914.48
5.6.300.0040.00714.54
5.6.290.0030.01014.24
5.6.280.0100.03517.76
5.6.270.0150.00014.39
5.6.260.0040.00814.14
5.6.250.0090.00614.66
5.6.240.0100.00714.39
5.6.230.0040.01114.35
5.6.220.0070.01014.26
5.6.210.0080.04517.24
5.6.200.0070.04416.38
5.6.190.0050.04817.45
5.6.180.0200.04217.44
5.6.170.0080.02817.36
5.6.160.0070.03217.39
5.6.150.0040.02616.15
5.6.140.0080.01916.16
5.6.130.0060.03816.34
5.6.120.0080.03517.61
5.6.110.0020.04917.60
5.6.100.0070.04317.80
5.6.90.0060.03817.80
5.6.80.0120.03717.25
5.6.70.0060.00614.02
5.6.60.0070.00714.29
5.6.50.0030.00614.05
5.6.40.0130.00314.21
5.6.30.0060.00313.94
5.6.20.0090.00614.15
5.6.10.0040.00813.98
5.6.00.0040.01414.26
5.5.380.0080.00414.37
5.5.370.0030.01014.17
5.5.360.0100.00713.91
5.5.350.0160.02917.29
5.5.340.0050.02216.11
5.5.330.0130.03817.35
5.5.320.0160.03017.30
5.5.310.0080.02717.18
5.5.300.0050.04716.19
5.5.290.0090.04016.02
5.5.280.0050.04617.64
5.5.270.0100.04217.30
5.5.260.0070.04517.42
5.5.250.0010.02417.25
5.5.240.0030.04117.24
5.5.230.0070.00714.03
5.5.220.0090.00014.27
5.5.210.0000.01114.12
5.5.200.0150.00314.15
5.5.190.0090.00313.90
5.5.180.0000.01414.25
5.5.170.0070.00714.25
5.5.160.0110.00714.25
5.5.150.0030.01014.23
5.5.140.0120.00013.96
5.5.130.0100.00314.29
5.5.120.0040.00713.86
5.5.110.0070.00714.43
5.5.100.0070.00714.02
5.5.90.0030.00914.41
5.5.80.0030.01314.29
5.5.70.0000.01514.00
5.5.60.0060.00613.96
5.5.50.0080.00014.27
5.5.40.0000.01013.82
5.5.30.0070.00714.38
5.5.20.0070.00713.92
5.5.10.0070.00714.14
5.5.00.0040.00713.86
5.4.450.0420.02515.99
5.4.440.0430.03515.84
5.4.430.0480.03615.96
5.4.420.0410.02615.93
5.4.410.0450.02815.91
5.4.400.0180.04415.58
5.4.390.0170.03515.57
5.4.380.0100.02915.52
5.4.370.0110.02315.47
5.4.360.0100.03315.58
5.4.350.0080.02612.21
5.4.340.0040.02312.21
5.4.330.0090.00012.40
5.4.320.0050.02312.46
5.4.310.0110.01812.45
5.4.300.0060.02012.46
5.4.290.0090.01912.46
5.4.280.0040.02212.40
5.4.270.0040.02112.40
5.4.260.0040.02412.40
5.4.250.0070.02012.40
5.4.240.0060.02012.40
5.4.230.0030.02512.40
5.4.220.0040.02012.40
5.4.210.0080.01812.40
5.4.200.0040.02712.40
5.4.190.0030.02212.40
5.4.180.0050.02112.40
5.4.170.0050.01912.40
5.4.160.0040.02212.40
5.4.150.0040.02312.40
5.4.140.0060.02312.24
5.4.130.0080.01812.23
5.4.120.0070.02112.21
5.4.110.0050.02112.21
5.4.100.0050.02012.21
5.4.90.0020.02412.21
5.4.80.0050.02012.21
5.4.70.0040.02112.21
5.4.60.0030.02412.21
5.4.50.0040.02212.21
5.4.40.0040.02112.20
5.4.30.0030.02312.20
5.4.20.0050.02212.20
5.4.10.0040.02312.20
5.4.00.0020.02511.94
5.3.290.0090.04312.80
5.3.280.0080.03812.71
5.3.270.0100.03912.72
5.3.260.0050.04112.72
5.3.250.0070.03612.72
5.3.240.0040.04012.72
5.3.230.0070.03612.71
5.3.220.0080.03512.68
5.3.210.0050.03912.68
5.3.200.0050.03712.68
5.3.190.0040.03912.68
5.3.180.0040.03912.67
5.3.170.0050.03712.67
5.3.160.0110.03212.67
5.3.150.0100.03312.67
5.3.140.0050.03812.66
5.3.130.0070.03812.66
5.3.120.0060.03812.66
5.3.110.0060.04012.66
5.3.100.0080.03712.13
5.3.90.0050.03612.11
5.3.80.0020.04012.11
5.3.70.0050.03712.11
5.3.60.0070.03412.09
5.3.50.0060.03512.03
5.3.40.0080.03512.03
5.3.30.0090.03211.99
5.3.20.0060.04111.77
5.3.10.0080.04811.74
5.3.00.0070.04211.73
5.2.170.0060.0369.23
5.2.160.0070.0299.23
5.2.150.0050.0309.23
5.2.140.0070.0349.23
5.2.130.0040.0359.19
5.2.120.0060.0289.19
5.2.110.0030.0319.19
5.2.100.0090.0279.18
5.2.90.0020.0329.18
5.2.80.0060.0309.18
5.2.70.0030.0339.18
5.2.60.0060.0299.14
5.2.50.0040.0309.11
5.2.40.0060.0279.09
5.2.30.0060.0289.05
5.2.20.0060.0299.05
5.2.10.0060.0278.95
5.2.00.0050.0298.82
5.1.60.0060.0228.10
5.1.50.0030.0268.10
5.1.40.0030.0268.08
5.1.30.0030.0278.42
5.1.20.0040.0278.45
5.1.10.0030.0358.17
5.1.00.0100.0218.18
5.0.50.0030.0226.65
5.0.40.0060.0216.51
5.0.30.0040.0306.33
5.0.20.0040.0186.29
5.0.10.0050.0186.27
5.0.00.0030.0306.27
4.4.90.0080.0104.77
4.4.80.0030.0154.75
4.4.70.0030.0154.75
4.4.60.0020.0154.75
4.4.50.0030.0154.77
4.4.40.0060.0224.71
4.4.30.0020.0164.76
4.4.20.0070.0114.84
4.4.10.0030.0174.85
4.4.00.0020.0254.76
4.3.110.0020.0174.67
4.3.100.0010.0164.66
4.3.90.0030.0154.63
4.3.80.0050.0234.58
4.3.70.0020.0154.63
4.3.60.0030.0154.63
4.3.50.0020.0164.63
4.3.40.0030.0284.54
4.3.30.0040.0143.32
4.3.20.0030.0153.29
4.3.10.0040.0143.26
4.3.00.0170.0177.11

preferences:
44.38 ms | 400 KiB | 5 Q