3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr["Intercambio"]["0"]["Versao"]["0"] = "2"; $arr["Intercambio"]["0"]["TipoIdentificacaoRemetente"]["0"] = "cnpj"; $arr["Intercambio"]["0"]["IdentificacaoRemetente"]["0"] = "02089969001420"; $arr["TextosCodificados"]["TextoCodificado"]["0"]["QualificadorAssunto"]["0"] = "ALL"; $arr["TextosCodificados"]["TextoCodificado"]["0"]["Texto"] = "Vnd mer.adq.rec.ter.op.mer.sj.rg.sub.trb.cnd.sub.t"; $arr["TextosCodificados"]["TextoCodificado"]["1"]["QualificadorAssunto"]["0"] = "AAI"; $arr["TextosCodificados"]["TextoCodificado"]["1"]["Texto"] = "Protocolo ICMS 18809 e 1192012 ICMS Retido Art 313W"; $arr["TextosCodificados"]["TextoCodificado"]["2"]["QualificadorAssunto"]["0"] = "IVN"; $arr["TextosCodificados"]["TextoCodificado"]["2"]["Texto"] = "Pedido Interno:0000283278 ID da Carga:"; function recursive_show_array($arr, $tmp = array()) {var_dump($arr);echo '.....'; foreach($arr as $k => $value) {var_dump($k);echo '.....';die; if(is_array($value)) { $tmp = recursive_show_array($value, $tmp); } else { //var_dump($value); $tmp[$k] = $value; } } return $tmp; } $rst = recursive_show_array($arr); var_dump($rst); die; function teste($arr) { $newArr = array(); foreach( $arr as $k => $v ) { $tmp = array(); if( is_array($v) && count($v) == 1 ) { $newArr[$k] = $v; $tmp = teste($v); } elseif( is_array($v) && count($v) > 1 ) { var_dump($v); $tmp = teste($v); //$newArr = array_merge($newArr, $tmp); } } return $newArr; } $rst = teste($arr); //var_dump($rst);

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.0100.00618.87
8.3.30.0100.00718.92
8.3.20.0060.00320.35
8.3.10.0040.00423.66
8.3.00.0030.00619.38
8.2.170.0040.01122.96
8.2.160.0130.00320.35
8.2.150.0030.01324.18
8.2.140.0070.00024.66
8.2.130.0040.00421.06
8.2.120.0080.00026.35
8.2.110.0030.00620.29
8.2.100.0060.00617.84
8.2.90.0040.00419.20
8.2.80.0050.00318.16
8.2.70.0040.00717.75
8.2.60.0040.00417.93
8.2.50.0030.00518.10
8.2.40.0040.00420.42
8.2.30.0030.00521.20
8.2.20.0040.00418.09
8.2.10.0000.00818.14
8.2.00.0000.00718.09
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00423.92
8.1.230.0040.00717.83
8.1.220.0000.00817.77
8.1.210.0000.00818.77
8.1.200.0040.00717.37
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0040.00420.29
8.1.160.0040.00419.00
8.1.150.0070.00020.67
8.1.140.0000.00719.52
8.1.130.0030.00318.92
8.1.120.0040.00417.60
8.1.110.0000.00717.55
8.1.100.0040.00417.43
8.1.90.0030.00717.56
8.1.80.0040.00417.48
8.1.70.0030.00617.43
8.1.60.0040.00417.63
8.1.50.0070.00017.47
8.1.40.0000.00817.57
8.1.30.0040.00417.65
8.1.20.0080.00017.57
8.1.10.0000.00817.52
8.1.00.0030.00617.45
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.55
8.0.270.0030.00317.38
8.0.260.0020.00516.89
8.0.250.0070.00017.00
8.0.240.0000.00817.11
8.0.230.0000.00717.02
8.0.220.0030.00316.95
8.0.210.0050.00217.03
8.0.200.0040.00417.12
8.0.190.0000.00816.96
8.0.180.0000.00816.98
8.0.170.0050.00217.07
8.0.160.0050.00317.05
8.0.150.0000.00716.94
8.0.140.0000.00716.99
8.0.130.0000.00713.41
8.0.120.0040.00417.02
8.0.110.0040.00417.08
8.0.100.0030.00516.92
8.0.90.0020.00516.97
8.0.80.0090.00917.03
8.0.70.0040.00417.11
8.0.60.0030.00516.90
8.0.50.0000.00717.01
8.0.30.0120.00917.18
8.0.20.0150.00917.40
8.0.10.0000.00717.11
8.0.00.0150.00516.77
7.4.330.0060.00015.55
7.4.320.0040.00416.43
7.4.300.0030.00316.67
7.4.290.0110.00016.56
7.4.280.0000.00816.56
7.4.270.0000.00716.68
7.4.260.0130.00016.62
7.4.250.0040.00416.51
7.4.240.0040.00416.60
7.4.230.0000.00716.57
7.4.220.0030.01416.53
7.4.210.0070.01016.77
7.4.200.0050.00216.67
7.4.160.0110.00916.49
7.4.150.0100.01017.40
7.4.140.0140.00517.86
7.4.130.0100.01016.66
7.4.120.0110.00916.62
7.4.110.0130.00716.53
7.4.100.0070.01816.39
7.4.90.0110.00816.70
7.4.80.0100.00719.39
7.4.70.0000.01816.70
7.4.60.0110.00616.72
7.4.50.0060.01016.52
7.4.40.0140.00316.71
7.4.30.0100.01016.56
7.4.00.0070.01015.00
7.3.330.0060.00013.49
7.3.320.0000.00513.47
7.3.310.0080.00016.46
7.3.300.0000.00716.51
7.3.290.0070.00016.45
7.3.280.0100.00716.47
7.3.270.0120.00617.40
7.3.260.0100.00916.50
7.3.250.0120.00616.49
7.3.240.0070.01116.53
7.3.230.0100.01016.63
7.3.210.0070.01016.56
7.3.200.0110.01116.71
7.3.190.0120.00816.38
7.3.180.0070.01016.54
7.3.170.0110.00716.40
7.3.160.0030.01416.46
7.3.120.0080.01014.90
7.3.110.0130.00315.00
7.3.100.0080.00915.01
7.3.90.0050.00514.98
7.3.80.0080.00614.96
7.3.70.0050.00814.98
7.3.60.0070.00514.85
7.3.50.0080.00614.82
7.3.40.0030.00714.77
7.3.30.0070.00714.90
7.3.20.0070.00716.71
7.3.10.0030.01016.74
7.3.00.0070.00816.63
7.2.330.0070.01016.63
7.2.320.0060.01216.82
7.2.310.0140.00716.57
7.2.300.0070.01116.59
7.2.290.0080.00816.71
7.2.250.0030.01515.24
7.2.240.0070.01315.00
7.2.230.0090.00315.03
7.2.220.0040.00715.18
7.2.210.0040.00914.96
7.2.200.0050.00715.12
7.2.190.0080.00514.82
7.2.180.0030.01015.24
7.2.170.0060.00414.96
7.2.60.0060.00617.07
7.2.00.0040.00819.15
7.1.330.0060.00915.84
7.1.320.0050.00815.81
7.1.310.0060.01115.78
7.1.300.0090.00515.67
7.1.290.0060.00815.86
7.1.280.0070.00515.72
7.1.270.0050.00815.85
7.1.260.0020.01115.84
7.1.200.0030.01015.84
7.1.100.0070.01018.09
7.1.70.0080.00417.33
7.1.60.0160.01835.00
7.1.50.0200.01934.88
7.1.40.0180.00734.59
7.1.30.0220.00334.34
7.1.20.0240.00734.40
7.1.10.0070.00716.57
7.1.00.0040.00916.41
7.0.200.0070.00716.75
7.0.190.0060.01216.68
7.0.180.0060.00616.43
7.0.170.0050.00816.20
7.0.160.0030.01016.22
7.0.150.0070.00716.26
7.0.140.0000.01316.58
7.0.130.0030.00916.57
7.0.120.0040.00816.48
7.0.110.0080.00416.32
7.0.100.0040.01116.34
7.0.90.0080.00516.42
7.0.80.0040.00916.33
7.0.70.0050.00816.43
7.0.60.0100.00315.98
7.0.50.0000.01216.31
7.0.40.0070.01116.44
7.0.30.0040.01416.44
7.0.20.0080.00716.69
7.0.10.0100.00316.51
7.0.00.0040.00816.43

preferences:
39.22 ms | 400 KiB | 5 Q