3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scan = "00:12:a9:54:f6:a7,Privacy,-52.00,3Com,6,30:91:8f:24:07:d0,RSN: Privacy,-85.00,CenturyLink3873,1,00:0c:e5:46:2d:74,ShortSlotTime,-92.00,WLAN,1,c0:3f:0e:57:87:e8,RSN: Privacy,-94.00,Megan-PC-Wireless,6,00:12:a9:54:f6:a7,ShortPreamble,-45.00,WLAN,7"; $escan = (explode(",",$scan)); $cscan = (array_chunk($escan, 5)); class Util { static function arrayToObject($array, $class = 'stdClass', $strict = false) { if (!is_array($array)) { return $array; } //create an instance of an class without calling class's constructor $object = unserialize( sprintf( 'O:%d:"%s":0:{}', strlen($class), $class ) ); if (is_array($array) && count($array) > 0) { foreach ($array as $name => $value) { $name = strtolower(trim($name)); var_dump($name); if (!empty($name)) { if(method_exists($object, 'set'.$name)){ $object->{'set'.$name}(Util::arrayToObject($value)); }else{ if(($strict)){ if(property_exists($class, $name)){ $object->$name = Util::arrayToObject($value); } }else{ $object->$name = Util::arrayToObject($value); } } } } return $object; } else { return FALSE; } } } $device = new Util($cscan); var_dump($device); ?>

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.0120.00618.43
8.3.60.0070.01016.63
8.3.50.0300.01021.24
8.3.40.0060.00918.74
8.3.30.0110.00718.67
8.3.20.0030.00620.13
8.3.10.0000.00823.52
8.3.00.0030.00622.46
8.2.190.0150.00616.88
8.2.180.0150.00318.29
8.2.170.0120.00322.96
8.2.160.0040.01122.19
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00017.63
8.2.110.0040.00722.08
8.2.100.0090.00317.63
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0050.00320.91
8.2.30.0000.00819.79
8.2.20.0030.00617.54
8.2.10.0000.00818.16
8.2.00.0040.00418.17
8.1.280.0100.00725.92
8.1.270.0060.00320.29
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0090.00022.02
8.1.230.0080.00417.42
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0040.00417.25
8.1.190.0050.00417.11
8.1.180.0000.00818.10
8.1.170.0040.00418.58
8.1.160.0000.00821.96
8.1.150.0050.00218.86
8.1.140.0040.00417.44
8.1.130.0000.00717.69
8.1.120.0000.00717.45
8.1.110.0040.00417.41
8.1.100.0030.00517.40
8.1.90.0000.00717.30
8.1.80.0030.00517.32
8.1.70.0030.00317.40
8.1.60.0000.00817.56
8.1.50.0050.00317.47
8.1.40.0040.00417.43
8.1.30.0040.00417.52
8.1.20.0060.00317.68
8.1.10.0060.00617.56
8.1.00.0000.00817.52
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0070.00018.35
8.0.270.0040.00417.21
8.0.260.0060.00017.24
8.0.250.0070.00416.99
8.0.240.0030.00316.97
8.0.230.0000.00816.98
8.0.220.0040.00416.90
8.0.210.0040.00416.76
8.0.200.0030.00316.98
8.0.190.0050.00316.98
8.0.180.0000.00716.93
8.0.170.0030.00616.92
8.0.160.0070.00016.82
8.0.150.0040.00416.88
8.0.140.0070.00016.81
8.0.130.0030.00313.28
8.0.120.0030.00616.87
8.0.110.0040.00416.82
8.0.100.0050.00316.68
8.0.90.0030.00316.79
8.0.80.0030.01216.93
8.0.70.0000.00716.87
8.0.60.0070.00016.84
8.0.50.0040.00416.76
8.0.30.0120.00717.17
8.0.20.0160.00817.40
8.0.10.0040.00416.91
8.0.00.0050.01316.67
7.4.330.0050.00015.09
7.4.320.0000.00716.61
7.4.300.0030.00316.56
7.4.290.0030.00316.50
7.4.280.0030.00616.50
7.4.270.0000.00816.59
7.4.260.0020.00516.42
7.4.250.0040.00416.55
7.4.240.0020.00616.61
7.4.230.0000.00716.24
7.4.220.0000.02216.44
7.4.210.0070.00716.55
7.4.200.0000.00716.39
7.4.160.0120.00316.56
7.4.150.0180.00017.40
7.4.140.0080.01317.86
7.4.130.0100.00616.39
7.4.120.0110.01016.44
7.4.110.0210.00316.20
7.4.100.0090.00916.39
7.4.90.0110.00716.44
7.4.80.0140.00319.39
7.4.70.0120.00916.33
7.4.60.0150.00916.50
7.4.50.0050.00316.17
7.4.40.0060.01316.66
7.4.30.0130.01016.39
7.4.00.0030.01014.75
7.3.330.0030.00312.98
7.3.320.0000.00513.16
7.3.310.0020.00516.16
7.3.300.0070.00016.05
7.3.290.0090.00616.18
7.3.280.0080.00916.18
7.3.270.0090.00917.40
7.3.260.0130.01016.50
7.3.250.0100.00716.30
7.3.240.0090.00916.40
7.3.230.0060.01116.39
7.3.210.0070.01016.61
7.3.200.0120.00616.21
7.3.190.0090.01216.22
7.3.180.0050.01116.34
7.3.170.0100.01316.45
7.3.160.0090.01316.48
7.2.330.0110.01116.58
7.2.320.0140.00416.64
7.2.310.0210.00316.40
7.2.300.0030.01216.45
7.2.290.0100.00716.63
7.2.00.0000.01219.05
7.1.100.0030.01017.78
7.1.70.0000.01016.93
7.1.60.0130.01319.18
7.1.50.0120.00616.95
7.1.00.0030.07722.54
7.0.200.0040.00416.64
7.0.60.0100.08020.02
7.0.50.0000.04317.98
7.0.40.0070.08020.09
7.0.30.0300.05720.24
7.0.20.0230.03720.10
7.0.10.0030.05720.07
7.0.00.0130.03720.19
5.6.280.0000.07020.91
5.6.210.0000.09320.52
5.6.200.0070.06718.13
5.6.190.0070.09020.77
5.6.180.0500.06020.65
5.6.170.0230.04720.54
5.6.160.0130.07320.54
5.6.150.0030.08018.22
5.6.140.0130.07018.18
5.6.130.0030.06718.26
5.6.120.0070.05020.91
5.6.110.0000.04321.00
5.6.100.0100.07720.98
5.6.90.0030.05721.11
5.6.80.0070.05720.44
5.5.350.0230.07320.48
5.5.340.0070.06717.98
5.5.330.0070.04320.13
5.5.320.0330.04320.28
5.5.310.0230.05320.23
5.5.300.0000.08718.01
5.5.290.0070.03717.94
5.5.280.0000.04320.86
5.5.270.0100.08320.90
5.5.260.0100.06720.89
5.5.250.0030.06320.70
5.5.240.0030.07020.17
5.4.450.0930.06019.33
5.4.440.0830.05319.70
5.4.430.0800.05719.16
5.4.420.0930.05319.38
5.4.410.0900.05019.06
5.4.400.0970.06719.28
5.4.390.0870.06719.11
5.4.380.0730.07018.98
5.4.370.0870.05318.84
5.4.360.0830.05319.22
5.4.350.0830.05019.28
5.4.340.0800.04319.15
5.4.320.0900.04719.30
5.4.310.0870.05319.28
5.4.300.0870.04718.86
5.4.290.0600.06019.36
5.4.280.0600.06319.14
5.4.270.0600.05718.99
5.4.260.0770.04719.28
5.4.250.0830.05719.13
5.4.240.0700.05719.29
5.4.230.0630.06018.96
5.4.220.0870.05719.19
5.4.210.0770.05319.18
5.4.200.0670.05316.81
5.4.190.0770.06018.88
5.4.180.0870.05319.07
5.4.170.0800.06019.34
5.4.160.0830.07318.98
5.4.150.0670.05719.08
5.4.140.0770.05016.52
5.4.130.0730.04316.73
5.4.120.0670.05316.34
5.4.110.0630.05316.35
5.4.100.0770.06316.52
5.4.90.0870.04716.55
5.4.80.0700.04716.55
5.4.70.0700.05316.70
5.4.60.0900.04716.38
5.4.50.0830.05316.37
5.4.40.0800.04316.35
5.4.30.0830.04316.38
5.4.20.0800.06316.30
5.4.10.0830.04716.39
5.4.00.0930.05715.86
5.3.290.0830.06714.68
5.3.280.0730.04714.69
5.3.270.0700.04714.53
5.3.260.0600.06014.64
5.3.250.0600.06014.86
5.3.240.0670.05314.77
5.3.230.0700.04714.47
5.3.220.0700.04714.50
5.3.210.0870.03314.59
5.3.200.0600.05314.63
5.3.190.0930.05714.55
5.3.180.1030.06014.59
5.3.170.0930.05314.57
5.3.160.0770.05314.72
5.3.150.0700.05014.62
5.3.140.0500.06314.54
5.3.130.0230.06314.61
5.3.120.0130.07314.56
5.3.110.0300.06314.55
5.3.100.0930.07014.05
5.3.90.1030.06313.95
5.3.80.0900.06714.05
5.3.70.0700.06014.05
5.3.60.0870.05714.02
5.3.50.0830.07313.96
5.3.40.0770.05713.97
5.3.30.0800.05013.97
5.3.20.1000.05013.63
5.3.10.0870.07013.72
5.3.00.0970.05713.57
5.2.170.0670.06011.07
5.2.160.0730.04011.17
5.2.150.0600.04711.25
5.2.140.0630.04311.21
5.2.130.0500.04311.18
5.2.120.0600.03311.02
5.2.110.0530.04311.07
5.2.100.0530.04311.12
5.2.90.0500.04311.12
5.2.80.0500.04711.01
5.2.70.0470.04711.11
5.2.60.0470.04710.93
5.2.50.0500.04311.13
5.2.40.0430.04011.02
5.2.30.0400.04311.00
5.2.20.0400.04310.84
5.2.10.0370.04710.93
5.2.00.0400.04310.79
5.1.60.0470.0279.93
5.1.50.0430.0409.85
5.1.40.0370.0409.89
5.1.30.0430.03710.34
5.1.20.0500.04710.34
5.1.10.0430.03310.11
5.1.00.0370.04010.09
5.0.50.0230.0278.55
5.0.40.0300.0208.59
5.0.30.0200.0478.16
5.0.20.0270.0238.11
5.0.10.0300.0238.09
5.0.00.0270.0408.25
4.4.90.0230.0205.88
4.4.80.0300.0135.75
4.4.70.0230.0205.82
4.4.60.0200.0235.79
4.4.50.0200.0235.76
4.4.40.0230.0335.87
4.4.30.0230.0205.82
4.4.20.0300.0275.81
4.4.10.0230.0205.85
4.4.00.0270.0305.85
4.3.110.0200.0235.76
4.3.100.0300.0305.86
4.3.90.0270.0235.75
4.3.80.0200.0335.70
4.3.70.0230.0235.66
4.3.60.0270.0205.70
4.3.50.0430.0175.78
4.3.40.0370.0335.63
4.3.30.0170.0204.97
4.3.20.0070.0274.97
4.3.10.0170.0204.97
4.3.00.0200.0237.12

preferences:
24.29 ms | 401 KiB | 5 Q