3v4l.org

run code in 300+ PHP versions simultaneously
<?php $superheroes = array( "spider_man" => array( "name" => "Peter Parker", "email" => "peterparker@mail.com", ), "super_man" => array( "name" => "Clark Kent", "email" => "clarkkent@mail.com", ), "iron_man" => array( "name" => "Harry Potter", "email" => "harrypotter@mail.com", "nicknames" => array( "name1" => "HP", "array" => array ( "arrayValue" => "value1", ), "name2" => "Potter", ), "test" => array( "test1" => "test1text", ), ) ); define(superheroes_spider_man_name, 1232); //print_r($superheroes); function setVariables_fromArray($array, $name) { forEach($array as $index => $item) { if(is_Array($item)) { $nameAltered = $name . "_" . $index; //funcIPSLog(("=========="), ("=========="), $enableIPSLog); //funcIPSLog(("ARRAY HEAD"), ($nameAltered), $enableIPSLog); echo "==========\n"; echo "ARRAY HEAD: '$nameAltered' \n"; setVariables_fromArray($item, $nameAltered); } else { //funcIPSLog(("VARIABLE: " . $nameVariable), ("Value: " . $item), $enableIPSLog); $nameVariable = $name . "_" . $index; echo "VARIABLE: '$nameVariable' VALUE: '$item' \n"; if(isset (${$nameVariable})) { //SetValueFloat(${$nameVariable}, $item); echo "SET: Die Variable '$nameVariable' mit dem Wert '$item' wurde gesetzt. \n"; } else { //funcIPSLog(("!!Meldung NetAtmo:"), ("Die Variable " . $nameVariable . " mit dem Wert " . $item . " ist nicht konfiguriert."), $enableIPSLog); echo "!! NetAtmo MELDUNG: Die Variable '$nameVariable' mit dem Wert '$item' ist nicht konfiguriert. \n"; } } } } setVariables_fromArray($superheroes, "superheroes");

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.70.0070.00718.43
8.3.60.0150.00016.35
8.3.50.0130.00522.08
8.3.40.0120.00318.96
8.3.30.0070.00718.53
8.3.20.0040.00420.34
8.3.10.0030.00523.65
8.3.00.0040.00419.25
8.2.190.0090.00617.00
8.2.180.0150.00617.00
8.2.170.0120.00622.96
8.2.160.0030.01020.37
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0060.00317.25
8.2.120.0040.00426.35
8.2.110.0090.00019.25
8.2.100.0100.00317.91
8.2.90.0090.00019.22
8.2.80.0050.00317.97
8.2.70.0030.00617.75
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0040.00419.46
8.2.30.0000.00720.70
8.2.20.0000.00817.64
8.2.10.0000.00818.13
8.2.00.0070.00018.01
8.1.280.0140.00725.92
8.1.270.0110.00323.77
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0070.00321.39
8.1.230.0070.00417.42
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0030.00617.25
8.1.190.0060.00317.23
8.1.180.0000.00718.10
8.1.170.0000.00818.55
8.1.160.0040.00421.94
8.1.150.0040.00418.80
8.1.140.0060.00319.60
8.1.130.0030.00317.66
8.1.120.0000.00817.53
8.1.110.0030.00717.31
8.1.100.0000.00717.44
8.1.90.0040.00417.44
8.1.80.0020.00517.46
8.1.70.0050.00317.48
8.1.60.0050.00217.59
8.1.50.0040.00417.55
8.1.40.0040.00417.52
8.1.30.0050.00317.72
8.1.20.0070.00017.54
8.1.10.0040.00417.49
8.1.00.0050.00517.55
8.0.300.0040.00418.77
8.0.290.0050.00316.74
8.0.280.0000.00818.38
8.0.270.0080.00017.34
8.0.260.0040.00417.26
8.0.250.0000.00717.07
8.0.240.0070.00017.08
8.0.230.0030.00317.06
8.0.220.0070.00316.94
8.0.210.0030.00316.96
8.0.200.0000.00717.05
8.0.190.0040.00417.08
8.0.180.0090.00016.89
8.0.170.0050.00316.92
8.0.160.0000.00716.99
8.0.150.0020.00516.87
8.0.140.0000.00816.86
8.0.130.0030.00313.39
8.0.120.0040.00416.95
8.0.110.0050.00216.87
8.0.100.0050.00216.79
8.0.90.0000.00716.98
8.0.80.0120.00816.96
8.0.70.0080.00017.01
8.0.60.0070.00017.10
8.0.50.0000.00916.83
8.0.30.0070.01017.00
8.0.20.0100.01217.40
8.0.10.0070.00017.12
8.0.00.0060.01216.72
7.4.330.0020.00216.85
7.4.320.0030.00316.62
7.4.300.0000.00716.54
7.4.290.0040.00416.54
7.4.280.0000.00716.62
7.4.270.0000.00716.62
7.4.260.0030.00316.52
7.4.250.0080.00016.59
7.4.240.0030.00316.54
7.4.230.0030.00316.72
7.4.220.0220.00616.65
7.4.210.0070.00716.65
7.4.200.0040.00416.70
7.4.160.0090.00916.62
7.4.150.0090.00917.40
7.4.140.0090.01017.86
7.4.130.0120.00716.59
7.4.120.0110.00816.58
7.4.110.0070.01116.67
7.4.100.0150.00616.39
7.4.90.0070.01016.41
7.4.80.0210.00019.39
7.4.70.0040.01316.45
7.4.60.0080.00816.59
7.4.50.0080.00816.53
7.4.40.0130.01016.50
7.4.30.0140.00716.36
7.4.00.0060.01015.14
7.3.330.0060.00013.43
7.3.320.0000.00813.40
7.3.310.0000.00716.35
7.3.300.0000.00716.42
7.3.290.0110.00516.43
7.3.280.0100.01016.47
7.3.270.0070.01017.40
7.3.260.0130.00316.46
7.3.250.0080.01016.47
7.3.240.0110.00916.42
7.3.230.0060.01216.66
7.3.210.0080.00816.52
7.3.200.0100.00716.45
7.3.190.0070.01016.71
7.3.180.0060.01216.57
7.3.170.0040.01216.48
7.3.160.0120.00616.37
7.3.120.0110.00314.64
7.3.110.0090.00614.90
7.3.100.0100.00315.02
7.3.90.0070.00415.01
7.3.80.0000.01014.86
7.3.70.0000.00914.52
7.3.60.0040.00914.98
7.3.50.0030.01314.64
7.3.40.0070.00714.88
7.3.30.0100.00615.01
7.3.20.0130.00316.48
7.3.10.0110.00516.64
7.3.00.0040.00716.74
7.2.330.0090.01516.46
7.2.320.0130.00316.72
7.2.310.0090.00916.50
7.2.300.0110.00716.63
7.2.290.0030.01416.72
7.2.240.0040.01414.93
7.2.230.0040.01215.18
7.2.220.0040.00714.98
7.2.210.0030.01215.31
7.2.200.0030.01015.17
7.2.190.0030.01314.95
7.2.180.0070.00715.16
7.2.170.0100.00315.19
7.2.160.0090.00615.06
7.2.150.0030.01316.97
7.2.140.0100.00716.86
7.2.130.0080.00716.79
7.2.120.0050.01016.79
7.2.110.0020.01116.81
7.2.100.0090.00416.75
7.2.90.0000.01316.83
7.2.80.0080.00816.82
7.2.70.0020.00816.80
7.2.60.0080.00716.86
7.2.50.0060.00816.97
7.2.40.0050.00716.74
7.2.30.0060.00916.89
7.2.20.0050.00816.86
7.2.10.0080.00616.96
7.2.00.0050.00817.69
7.1.330.0100.00715.57
7.1.320.0030.01015.82
7.1.310.0090.00915.92
7.1.300.0000.01115.75
7.1.290.0000.01515.90
7.1.280.0040.01215.85
7.1.270.0100.00315.62
7.1.260.0080.00615.60
7.1.250.0010.01215.97
7.1.200.0070.00715.60
7.1.100.0000.01118.15
7.1.70.0000.00917.16
7.1.60.0130.01019.36
7.1.50.0040.01517.04
7.1.00.0000.08022.46
7.0.200.0000.01016.63
7.0.60.0170.07019.83
7.0.50.0100.05317.97
7.0.40.0100.08020.13
7.0.30.0400.08320.15
7.0.20.0300.06720.23
7.0.10.0070.08720.09
7.0.00.0100.08720.09
5.6.210.0130.07320.45
5.6.200.0070.08718.22
5.6.190.0030.04320.48
5.6.180.0270.05320.58
5.6.170.0170.04720.44
5.6.160.0000.04720.54
5.6.150.0000.05718.18
5.6.140.0070.08018.16
5.6.130.0130.07318.15
5.6.120.0000.06321.15
5.6.110.0130.06721.06
5.6.100.0070.06320.99
5.6.90.0030.05321.02
5.6.80.0130.06720.30
5.5.350.0370.07020.39
5.5.340.0100.06317.95
5.5.330.0100.03720.43
5.5.320.0330.04720.51
5.5.310.0270.06020.32
5.5.300.0170.07718.00
5.5.290.0070.08317.93
5.5.280.0070.05020.86
5.5.270.0000.05020.86
5.5.260.0170.08320.73
5.5.250.0070.04020.63
5.5.240.0300.07020.29

preferences:
61.61 ms | 401 KiB | 5 Q