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()) { foreach($arr as $k => $value) {var_dump(is_array($value));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.0160.00618.92
8.3.30.0150.00018.82
8.3.20.0120.00020.38
8.3.10.0080.00021.89
8.3.00.0060.00319.50
8.2.170.0140.00722.96
8.2.160.0070.00720.35
8.2.150.0130.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00021.00
8.2.120.0000.00826.35
8.2.110.0030.00720.47
8.2.100.0080.00518.00
8.2.90.0060.00319.26
8.2.80.0050.00317.97
8.2.70.0070.00417.75
8.2.60.0040.00417.93
8.2.50.0000.00918.10
8.2.40.0080.00020.54
8.2.30.0080.00020.96
8.2.20.0050.00318.30
8.2.10.0050.00218.25
8.2.00.0000.00818.13
8.1.270.0050.00323.96
8.1.260.0070.00026.35
8.1.250.0030.00528.09
8.1.240.0040.00423.89
8.1.230.0040.00718.02
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0080.00017.48
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0030.00520.42
8.1.160.0000.00819.14
8.1.150.0040.00420.68
8.1.140.0050.00319.69
8.1.130.0040.00418.96
8.1.120.0040.00417.58
8.1.110.0040.00417.58
8.1.100.0000.00717.43
8.1.90.0070.00317.54
8.1.80.0080.00017.43
8.1.70.0040.00417.49
8.1.60.0000.00817.57
8.1.50.0000.00817.61
8.1.40.0030.00517.63
8.1.30.0000.00717.74
8.1.20.0050.00317.66
8.1.10.0040.00417.62
8.1.00.0050.00217.58
8.0.300.0060.00318.77
8.0.290.0050.00316.75
8.0.280.0000.00718.52
8.0.270.0000.00717.21
8.0.260.0030.00316.87
8.0.250.0000.00716.99
8.0.240.0000.00717.09
8.0.230.0050.00216.99
8.0.220.0000.00717.09
8.0.210.0030.00317.07
8.0.200.0030.00516.98
8.0.190.0030.00516.97
8.0.180.0080.00017.09
8.0.170.0020.00516.96
8.0.160.0030.00617.07
8.0.150.0040.00416.88
8.0.140.0040.00417.03
8.0.130.0030.00313.50
8.0.120.0040.00416.88
8.0.110.0070.00016.91
8.0.100.0040.00416.85
8.0.90.0000.00716.91
8.0.80.0100.00616.93
8.0.70.0000.00716.96
8.0.60.0050.00217.07
8.0.50.0040.00416.86
8.0.30.0100.00817.37
8.0.20.0130.00617.40
8.0.10.0000.00817.14
8.0.00.0130.00617.00
7.4.330.0000.00515.55
7.4.320.0030.00316.66
7.4.300.0030.00316.57
7.4.290.0040.00716.27
7.4.280.0080.00016.70
7.4.270.0030.00316.70
7.4.260.0040.00416.62
7.4.250.0030.00616.64
7.4.240.0000.00716.70
7.4.230.0040.00416.75
7.4.220.0100.00616.72
7.4.210.0130.00116.65
7.4.200.0080.00016.69
7.4.160.0080.01016.61
7.4.150.0090.00917.40
7.4.140.0110.00717.86
7.4.130.0090.01216.71
7.4.120.0120.00916.54
7.4.110.0040.01616.75
7.4.100.0070.01916.61
7.4.90.0090.00916.60
7.4.80.0100.01319.39
7.4.70.0060.00916.75
7.4.60.0100.00616.64
7.4.50.0090.00616.29
7.4.40.0030.01316.64
7.4.30.0060.01416.68
7.4.00.0000.01415.13
7.3.330.0000.00513.34
7.3.320.0000.00513.43
7.3.310.0000.00716.58
7.3.300.0030.00316.49
7.3.290.0070.00016.36
7.3.280.0060.01016.46
7.3.270.0100.01017.40
7.3.260.0120.00616.52
7.3.250.0070.01316.56
7.3.240.0080.01116.44
7.3.230.0120.00416.67
7.3.210.0140.00316.63
7.3.200.0100.00716.49
7.3.190.0070.01416.55
7.3.180.0100.00616.48
7.3.170.0090.00916.52
7.3.160.0000.02216.45
7.2.330.0140.00316.74
7.2.320.0090.01516.38
7.2.310.0100.01316.80
7.2.300.0100.00716.81
7.2.290.0090.00916.41
7.2.110.0100.01016.63
7.2.60.0130.00316.55
7.2.00.0070.00719.10
7.1.200.0050.00515.81
7.1.100.0000.01418.27
7.1.70.0040.00817.25
7.1.60.0170.01034.83
7.1.50.0210.00734.77
7.1.40.0130.01934.44
7.1.30.0160.02034.49
7.1.20.0130.01334.43
7.1.10.0000.01416.45
7.1.00.0070.00716.70
7.0.200.0030.01016.94
7.0.190.0080.00416.42
7.0.180.0030.01016.27
7.0.170.0060.01216.30
7.0.160.0040.00916.52
7.0.150.0000.01416.35
7.0.140.0030.01016.58
7.0.130.0030.01116.45
7.0.120.0060.00916.57
7.0.110.0090.00616.33
7.0.100.0030.01216.36
7.0.90.0060.00616.46
7.0.80.0060.00616.48
7.0.70.0060.00616.29
7.0.60.0030.01016.36
7.0.50.0030.01016.57
7.0.40.0000.01216.42
7.0.30.0030.00916.50
7.0.20.0090.00316.54
7.0.10.0110.00616.50
7.0.00.0050.00816.60

preferences:
35.98 ms | 400 KiB | 5 Q