3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getValorDecimal($linhaDados, $posicaoInicial, $tamanhoCampo, $decimal = 0) { $retorno = ""; $retorno = substr($linhaDados,$posicaoInicial-1 , $tamanhoCampo ); $retorno = trim($retorno); $retorno = str_replace(".","", $retorno); $retorno = str_replace(",",".", $retorno); if ($retorno != "") { $retorno = ltrim($retorno,'0'); if ($retorno == '') { $retorno = '0'; } if ($retorno != 0 && $decimal != 0) { $divisor = str_pad('1', $decimal + 1, '0'); $retorno = round($retorno / $divisor , $decimal); } } return $retorno; } $v = getValorDecimal('000000015565835', 1, 15, 2); echo str_replace(".",",", $v);

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.0140.00716.63
8.3.50.0130.00316.27
8.3.40.0060.00918.65
8.3.30.0040.01118.64
8.3.20.0040.00422.07
8.3.10.0050.00323.63
8.3.00.0040.00418.22
8.2.180.0040.01116.63
8.2.170.0140.00722.96
8.2.160.0120.00620.89
8.2.150.0050.00324.18
8.2.140.0020.00524.66
8.2.130.0000.00820.69
8.2.120.0040.00426.35
8.2.110.0070.00321.12
8.2.100.0080.00317.84
8.2.90.0040.00719.29
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0030.00618.05
8.2.50.0040.00418.10
8.2.40.0000.00820.49
8.2.30.0000.00819.25
8.2.20.0050.00318.13
8.2.10.0020.00518.24
8.2.00.0040.00418.18
8.1.280.0130.00925.92
8.1.270.0040.00422.27
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.92
8.1.230.0030.00917.83
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0110.00017.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0040.00418.86
8.1.150.0000.00820.24
8.1.140.0040.00419.64
8.1.130.0070.00020.71
8.1.120.0000.00717.44
8.1.110.0000.00817.55
8.1.100.0080.00017.53
8.1.90.0000.00817.39
8.1.80.0040.00417.54
8.1.70.0050.00217.51
8.1.60.0000.00817.63
8.1.50.0040.00417.62
8.1.40.0040.00417.59
8.1.30.0000.00817.66
8.1.20.0040.00417.63
8.1.10.0030.00617.62
8.1.00.0040.00417.56
8.0.300.0000.00918.77
8.0.290.0000.00916.75
8.0.280.0030.00318.55
8.0.270.0000.00717.29
8.0.260.0000.00616.87
8.0.250.0030.00316.93
8.0.240.0000.00716.96
8.0.230.0000.00817.00
8.0.220.0080.00016.84
8.0.210.0000.00716.83
8.0.200.0090.00016.88
8.0.190.0060.00316.97
8.0.180.0000.00716.82
8.0.170.0030.00317.02
8.0.160.0000.00716.87
8.0.150.0000.00716.91
8.0.140.0000.00716.91
8.0.130.0030.00313.38
8.0.120.0000.00816.92
8.0.110.0040.00417.02
8.0.100.0040.00416.75
8.0.90.0000.00817.00
8.0.80.0070.00716.95
8.0.70.0050.00216.93
8.0.60.0070.00017.00
8.0.50.0050.00216.82
8.0.30.0060.01117.22
8.0.20.0120.00917.40
8.0.10.0070.00017.12
8.0.00.0120.00616.95
7.4.330.0000.00415.55
7.4.320.0070.00016.57
7.4.300.0030.00316.55
7.4.290.0030.00316.67
7.4.280.0040.00416.67
7.4.270.0080.00016.57
7.4.260.0070.00016.66
7.4.250.0050.00316.70
7.4.240.0000.00716.73
7.4.230.0000.00716.64
7.4.220.0070.01016.44
7.4.210.0110.00316.68
7.4.200.0050.00216.37
7.4.160.0090.00916.52
7.4.150.0060.01217.40
7.4.140.0140.00617.86
7.4.130.0090.01516.68
7.4.120.0110.01216.49
7.4.110.0040.01316.61
7.4.100.0100.01316.54
7.4.90.0110.00616.52
7.4.80.0110.00619.39
7.4.70.0130.00316.58
7.4.60.0100.00616.54
7.4.50.0000.01516.28
7.4.40.0130.00316.54
7.4.30.0050.01816.52
7.4.10.0030.01615.85
7.4.00.0060.01215.56
7.3.330.0000.00513.29
7.3.320.0030.00313.49
7.3.310.0000.00716.32
7.3.300.0000.00716.38
7.3.290.0110.00316.41
7.3.280.0090.00816.41
7.3.270.0140.00417.40
7.3.260.0120.00716.54
7.3.250.0090.00816.64
7.3.240.0120.00516.63
7.3.230.0120.00616.69
7.3.210.0070.01116.43
7.3.200.0130.00316.44
7.3.190.0060.01216.59
7.3.180.0030.01316.67
7.3.170.0130.00316.56
7.3.160.0160.00016.40
7.3.130.0030.01515.46
7.3.120.0060.01315.58
7.3.110.0060.01015.73
7.3.100.0090.00515.53
7.3.90.0000.01315.81
7.3.80.0000.01015.57
7.3.70.0090.00615.63
7.3.60.0030.01115.62
7.3.50.0070.00715.60
7.3.40.0020.01115.60
7.3.30.0060.00515.62
7.3.20.0050.01017.42
7.3.10.0070.00517.32
7.3.00.0000.01017.44
7.2.330.0140.00316.80
7.2.320.0160.00016.57
7.2.310.0100.00616.77
7.2.300.0070.01116.68
7.2.290.0130.00316.66
7.2.260.0120.00515.88
7.2.250.0050.01115.81
7.2.240.0050.01015.94
7.2.230.0030.01215.97
7.2.220.0030.01515.58
7.2.210.0090.00315.57
7.2.200.0100.00715.81
7.2.190.0100.00715.83
7.2.180.0080.00515.83
7.2.170.0030.01015.71
7.2.160.0030.01015.76
7.2.150.0060.01017.53
7.2.140.0030.01117.42
7.2.130.0080.00917.52
7.2.120.0030.01017.72
7.2.110.0020.01017.52
7.2.100.0080.00617.70
7.2.90.0070.00817.78
7.2.80.0080.00817.63
7.2.70.0060.01117.69
7.2.60.0080.01117.32
7.2.50.0050.00517.63
7.2.40.0090.00417.71
7.2.30.0040.00817.65
7.2.20.0030.00817.60
7.2.10.0060.00717.54
7.2.00.0090.00617.58
7.1.330.0050.00716.62
7.1.320.0040.00716.46
7.1.310.0060.00616.40
7.1.300.0060.00716.37
7.1.290.0040.00916.55
7.1.280.0040.00716.63
7.1.270.0050.00916.52
7.1.260.0030.01016.72
7.1.250.0040.01116.55
7.1.240.0050.00416.57
7.1.230.0050.00716.66
7.1.220.0050.00716.65
7.1.210.0050.00516.38
7.1.200.0070.00616.27
7.1.190.0050.00816.46
7.1.180.0030.00716.49
7.1.170.0050.00516.60
7.1.160.0100.00116.44
7.1.150.0020.00916.44
7.1.140.0070.00716.61
7.1.130.0050.00816.54
7.1.120.0030.01016.41
7.1.110.0080.00516.67
7.1.100.0050.00916.49
7.1.90.0070.00616.48
7.1.80.0040.00616.58
7.1.70.0100.00516.70
7.1.60.0410.00921.89
7.1.50.0430.00722.02
7.1.40.0790.00921.84
7.1.30.0820.01721.85
7.1.20.0550.01321.91
7.1.10.0130.00616.00
7.1.00.0350.00716.00
7.0.330.0060.00816.31
7.0.320.0080.00316.05
7.0.310.0050.00716.16
7.0.300.0040.01116.03
7.0.290.0030.00616.10
7.0.280.0040.00816.40
7.0.270.0050.00716.16
7.0.260.0060.00616.13
7.0.250.0030.00616.34
7.0.240.0060.00816.38
7.0.230.0070.00516.08
7.0.220.0060.00516.44
7.0.210.0060.00716.40
7.0.200.0630.00615.73
7.0.190.0510.00615.79
7.0.180.0340.00715.58
7.0.170.0810.01015.75
7.0.160.0490.01015.60
7.0.150.0350.00815.75
7.0.140.0350.01015.70
7.0.130.0530.01015.60
7.0.120.0380.00915.65
7.0.110.0560.00915.62
7.0.100.0370.01115.57
7.0.90.0310.01015.55
7.0.80.0460.01315.70
7.0.70.0310.00915.69
7.0.60.0320.01015.74
7.0.50.0300.01215.62
7.0.40.0450.00614.40
7.0.30.0560.01114.46
7.0.20.0370.00814.22
7.0.10.0450.00514.33
7.0.00.0340.00614.36
5.6.400.0030.01015.04
5.6.390.0030.00714.94
5.6.380.0020.01215.19
5.6.370.0030.01015.00
5.6.360.0050.00915.28
5.6.350.0070.00615.26
5.6.340.0040.01014.92
5.6.330.0020.01315.20
5.6.320.0050.00815.12
5.6.310.0030.01015.28
5.6.300.0070.00814.97
5.6.290.0070.00715.18
5.6.280.0060.00415.25
5.6.270.0090.00715.09
5.6.260.0050.00815.04
5.6.250.0050.00615.20
5.6.240.0050.00815.17
5.6.230.0050.00915.15
5.6.220.0020.01314.96
5.6.210.0070.00715.25
5.6.200.0090.00515.20
5.6.190.0060.00715.17
5.6.180.0090.00515.14
5.6.170.0060.00815.12
5.6.160.0060.00815.08
5.6.150.0050.00714.98
5.6.140.0060.00715.16
5.6.130.0050.00815.16
5.6.120.0070.00715.37
5.6.110.0080.00415.11
5.6.100.0080.00415.07
5.6.90.0080.00315.36
5.6.80.0050.00914.98
5.6.70.0090.00415.03
5.6.60.0040.00914.89
5.6.50.0060.00515.06
5.6.40.0030.01015.00
5.6.30.0000.01515.01
5.6.20.0090.00415.05
5.6.10.0060.00915.03
5.6.00.0050.00914.96

preferences:
53.48 ms | 400 KiB | 5 Q