3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"Hydrogen":"Diamagnetic","Niobium":"N/A","Thallium":"Diamagnetic","Helium":"Diamagnetic","Molybdenum":"Paramagnetic","Lead":"Diamagnetic","Lithium":"Paramagnetic","Technetium":"N/A","Bismuth":"Diamagnetic","Beryllium":"Diamagnetic","Ruthenium":"Paramagnetic","Polonium":"N/A","Boron":"Diamagnetic","Rhodium":"Paramagnetic","Astatine":"N/A","Carbon":"Diamagnetic","Palladium":"Paramagnetic","Radon":"N/A","Nitrogen":"Diamagnetic","Silver":"Diamagnetic","Francium":"N/A","Oxygen":"Paramagnetic","Cadmium":"Diamagnetic","Radium":"N/A","Fluorine":"N/A","Indium":"Diamagnetic","Actinium":"N/A","Neon":"Diamagnetic","Tin":"Paramagnetic","Thorium":"N/A","Sodium":"Paramagnetic","Antimony":"Diamagnetic","Protactinium":"N/A","Magnesium":"Paramagnetic","Tellurium":"Diamagnetic","Uranium":"N/A","Aluminum":"Paramagnetic","Iodine":"N/A","Neptunium":"N/A","Silicon":"Diamagnetic","Xenon":"Diamagnetic","Plutonium":"N/A","Phosphorus":"Diamagnetic","Cesium":"N/A","Americium":"N/A","Sulfur":"Diamagnetic","Barium":"Paramagnetic","Curium":"N/A","Chlorine":"Diamagnetic","Lanthanum":"N/A","Berkelium":"N/A","Argon":"Diamagnetic","Cerium":"Paramagnetic","Californium":"N/A","Potassium":"N/A","Praseodymium":"N/A","Einsteinium":"N/A","Calcium":"Paramagnetic","Neodymium":"Paramagnetic","Fermium":"N/A","Scandium":"N/A","Promethium":"N/A","Mendelevium":"N/A","Titanium":"Paramagnetic","Samarium":"Paramagnetic","Nobelium":"N/A","Vanadium":"N/A","Europium":"Paramagnetic","Lawrencium":"N/A","Chromium":"Antiferromagnetic","Gadolinium":"Ferromagnetic","Rutherfordium":"N/A","Manganese":"Paramagnetic","Terbium":"Paramagnetic","Dubnium":"N/A","Iron":"Ferromagnetic","Dysprosium":"Paramagnetic","Seaborgium":"N/A","Cobalt":"Ferromagnetic","Holmium":"Paramagnetic","Bohrium":"N/A","Nickel":"Ferromagnetic","Erbium":"Paramagnetic","Hassium":"N/A","Copper":"Diamagnetic","Thulium":"Paramagnetic","Meitnerium":"N/A","Zinc":"Diamagnetic","Ytterbium":"N/A","Darmstadtium":"N/A","Gallium":"Diamagnetic","Lutetium":"N/A","Roentgenium":"N/A","Germanium":"Diamagnetic","Hafnium":"N/A","Ununbium":"N/A","Arsenic":"Diamagnetic","Tantalum":"N/A","Ununtrium":"N/A","Selenium":"Diamagnetic","Tungsten":"Paramagnetic","Ununquadium":"N/A","Bromine":"Diamagnetic","Rhenium":"N/A","Ununpentium":"N/A","Krypton":"Diamagnetic","Osmium":"Paramagnetic","Ununhexium":"N/A","Rubidium":"N/A","Iridium":"Paramagnetic","Ununseptium":"N/A","Strontium":"Paramagnetic","Platinum":"Paramagnetic","Ununoctium":"N/A","Yttrium":"N/A","Gold":"Diamagnetic","Zirconium":"Paramagnetic","Mercury":"Diamagnetic"}'; $arr = json_decode($json, true); sort($arr); foreach ($arr as $element => $magnetism) { echo $magnetism . PHP_EOL; }

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.4.20.0070.01317.61
8.4.10.0100.00017.68
8.3.150.0120.00616.57
8.3.140.0110.00717.20
8.3.130.0100.00618.48
8.3.120.0040.00419.00
8.3.110.0030.00520.94
8.3.100.0040.00424.06
8.3.90.0090.00626.77
8.3.80.0090.00318.43
8.3.70.0150.00316.63
8.3.60.0140.00716.75
8.3.50.0120.00621.95
8.3.40.0090.00618.84
8.3.30.0070.00719.01
8.3.20.0040.00420.36
8.3.10.0040.00421.90
8.3.00.0080.00017.25
8.2.270.0060.00318.69
8.2.260.0040.00418.49
8.2.250.0030.00617.25
8.2.240.0160.00317.28
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0120.00626.77
8.2.200.0030.00616.75
8.2.190.0100.00716.58
8.2.180.0130.00618.11
8.2.170.0070.00722.96
8.2.160.0120.00920.25
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00320.82
8.2.110.0100.00022.33
8.2.100.0040.00717.85
8.2.90.0000.00918.22
8.2.80.0040.00417.97
8.2.70.0000.00817.80
8.2.60.0040.00418.04
8.2.50.0000.00818.10
8.2.40.0040.00420.43
8.2.30.0080.00018.06
8.2.20.0030.00517.70
8.2.10.0000.00818.14
8.2.00.0030.00818.11
8.1.310.0080.00018.15
8.1.300.0000.01017.99
8.1.290.0100.00030.84
8.1.280.0090.00925.92
8.1.270.0030.00523.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.87
8.1.230.0060.00722.70
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0030.00617.23
8.1.180.0030.00518.10
8.1.170.0000.00818.41
8.1.160.0060.00322.06
8.1.150.0040.00418.86
8.1.140.0040.00417.47
8.1.130.0000.00717.59
8.1.120.0060.00317.45
8.1.110.0040.00417.39
8.1.100.0000.00817.53
8.1.90.0070.00017.49
8.1.80.0040.00417.50
8.1.70.0000.00717.52
8.1.60.0050.00317.49
8.1.50.0050.00317.41
8.1.40.0080.00017.50
8.1.30.0060.00317.69
8.1.20.0000.00817.65
8.1.10.0040.00417.49
8.1.00.0000.00817.47
8.0.300.0000.00822.07
8.0.290.0040.00416.75
8.0.280.0080.00018.41
8.0.270.0070.00017.31
8.0.260.0040.00417.18
8.0.250.0080.00017.07
8.0.240.0060.00316.89
8.0.230.0030.00317.04
8.0.220.0050.00216.83
8.0.210.0000.00716.96
8.0.200.0030.00316.87
8.0.190.0060.00316.95
8.0.180.0070.00016.85
8.0.170.0080.00016.87
8.0.160.0000.00716.77
8.0.150.0070.00016.89
8.0.140.0000.00716.81
8.0.130.0000.00613.37
8.0.120.0000.00816.77
8.0.110.0000.00716.93
8.0.100.0040.00416.71
8.0.90.0060.00316.73
8.0.80.0060.00916.87
8.0.70.0030.00516.96
8.0.60.0040.00416.89
8.0.50.0000.00716.89
8.0.30.0110.00817.15
8.0.20.0160.00417.40
8.0.10.0040.00417.14
8.0.00.0100.00916.81
7.4.330.0050.00015.10
7.4.320.0030.00316.50
7.4.300.0000.00716.56
7.4.290.0000.00716.52
7.4.280.0000.00916.60
7.4.270.0030.00316.52
7.4.260.0030.00316.39
7.4.250.0030.00516.34
7.4.240.0020.00516.57
7.4.230.0030.00316.55
7.4.220.0030.01616.55
7.4.210.0030.01216.64
7.4.200.0070.00016.61
7.4.160.0110.00516.45
7.4.150.0140.00417.40
7.4.140.0110.01117.86
7.4.130.0070.01216.40
7.4.120.0130.00616.49
7.4.110.0140.01016.44
7.4.100.0130.00716.46
7.4.90.0170.00616.40
7.4.80.0120.00919.39
7.4.70.0140.00516.63
7.4.60.0130.01016.40
7.4.50.0050.00516.56
7.4.40.0090.00916.63
7.4.30.0070.01016.50
7.4.00.0060.01015.04
7.3.330.0040.00213.21
7.3.320.0050.00013.21
7.3.310.0070.00016.27
7.3.300.0070.00016.28
7.3.290.0060.00816.27
7.3.280.0120.00616.25
7.3.270.0180.00817.40
7.3.260.0050.01316.60
7.3.250.0120.00616.42
7.3.240.0110.00816.41
7.3.230.0170.00616.39
7.3.210.0120.00416.62
7.3.200.0080.00819.39
7.3.190.0030.01416.46
7.3.180.0100.01416.41
7.3.170.0090.00916.29
7.3.160.0080.01616.32
7.3.10.0000.01716.64
7.3.00.0000.01716.72
7.2.330.0160.00316.66
7.2.320.0060.01216.61
7.2.310.0090.00916.76
7.2.300.0080.00816.70
7.2.290.0110.01416.54
7.2.130.0070.00716.86
7.2.120.0040.01216.96
7.2.110.0030.00817.01
7.2.100.0040.01116.66
7.2.90.0060.00616.88
7.2.80.0150.00016.75
7.2.70.0050.00517.04
7.2.60.0030.01216.76
7.2.50.0000.01217.10
7.2.40.0040.00816.88
7.2.30.0060.00916.83
7.2.20.0060.00916.66
7.2.10.0100.00616.56
7.2.00.0040.00918.28
7.1.250.0030.00915.78
7.1.200.0070.00415.55
7.1.100.0150.01217.90
7.1.70.0000.01116.86
7.1.60.0110.01419.59
7.1.50.0210.01134.82
7.1.00.0100.06322.35
7.0.200.0100.00016.84
7.0.60.0130.07319.96
7.0.50.0070.06717.80
7.0.40.0130.08020.12
7.0.30.0100.05020.05
7.0.20.0200.07320.02
7.0.10.0400.06320.18
7.0.00.0130.08020.13
5.6.280.0070.06721.13
5.6.210.0100.05320.48
5.6.200.0100.08318.22
5.6.190.0070.05020.35
5.6.180.3170.04020.61
5.6.170.0230.05320.37
5.6.160.0030.05320.52
5.6.150.0070.05718.12
5.6.140.0070.06718.14
5.6.130.0070.03718.20
5.6.120.0230.07321.01
5.6.110.0170.07321.08
5.6.100.0070.04021.00
5.6.90.0200.07020.99
5.6.80.0100.07320.37
5.6.70.3730.03720.28
5.5.350.0270.07320.43
5.5.340.0000.04318.01
5.5.330.0130.04720.23
5.5.320.0400.07020.28
5.5.310.0270.07720.12
5.5.300.0000.04717.97
5.5.290.0030.08717.98
5.5.280.0130.08020.98
5.5.270.0130.04320.76
5.5.260.0170.08320.64
5.5.250.0130.05020.71
5.5.240.0070.06320.29
5.4.450.0530.07019.14
5.4.440.0570.07019.41
5.4.430.0470.05019.40
5.4.420.0500.04719.23
5.4.410.0500.04319.29
5.4.400.0530.06319.22
5.4.390.0570.04018.92
5.4.380.0470.06018.82
5.4.370.0330.03718.93
5.4.360.0400.05718.93
5.4.350.0400.03719.09
5.4.340.0470.03319.09
5.4.320.0470.07019.16
5.4.310.0500.06019.21
5.4.300.0430.06719.22
5.4.290.0330.04019.12
5.4.280.0430.03318.74
5.4.270.0400.03319.13
5.4.260.0400.03019.08
5.4.250.0430.06319.12
5.4.240.0300.04018.79
5.4.230.0470.07019.17
5.4.220.0430.05019.09
5.4.210.0470.04718.78
5.4.200.0500.05019.24
5.4.190.0470.04719.14
5.4.180.0500.03319.19
5.4.170.0470.03318.88
5.4.160.0470.03318.91
5.4.150.0730.02718.89
5.4.140.0430.03316.46
5.4.130.0430.03316.21
5.4.120.0430.03316.37
5.4.110.0500.04016.52
5.4.100.0500.04716.09
5.4.90.0570.06316.49
5.4.80.0570.05716.48
5.4.70.0500.06016.29
5.4.60.0530.06716.32
5.4.50.0530.05716.38
5.4.40.0530.05316.06
5.4.30.0500.03316.32
5.4.20.0600.03716.19
5.4.10.0470.06016.43
5.4.00.0570.05015.73
5.3.290.0470.05014.71
5.3.280.0700.02714.57
5.3.270.0400.04714.47
5.3.260.0400.04014.46
5.3.250.0330.04314.48
5.3.240.0530.04714.54
5.3.230.0600.06314.57
5.3.220.0500.04714.54
5.3.210.0530.06314.53
5.3.200.0600.06714.69
5.3.190.0530.06714.43
5.3.180.0470.05314.45
5.3.170.0500.05314.47
5.3.160.0470.04014.47
5.3.150.0530.05714.53
5.3.140.0500.04714.49
5.3.130.0470.05714.61
5.3.120.0430.04014.62
5.3.110.0530.07314.45
5.3.100.0530.06714.11
5.3.90.0570.05714.00
5.3.80.0500.03714.00
5.3.70.0500.05713.82
5.3.60.0630.05313.87
5.3.50.0530.04013.96
5.3.40.0530.05013.81
5.3.30.0500.04013.72
5.3.20.0470.06013.52
5.3.10.0400.03013.53
5.3.00.0370.06713.65
5.2.170.0400.05712.27
5.2.160.0330.03712.27
5.2.150.0370.05312.27
5.2.140.0430.05312.27
5.2.130.0470.04312.27
5.2.120.0300.03712.27
5.2.110.0430.05312.27
5.2.100.0300.02712.27
5.2.90.0400.05712.27
5.2.80.0300.03012.27
5.2.70.0270.03312.27
5.2.60.0470.03012.27
5.2.50.0430.05012.27
5.2.40.0400.05312.27
5.2.30.0370.03712.27
5.2.20.0370.03312.27
5.2.10.0370.05012.27
5.2.00.0430.04012.27
5.1.60.0400.04312.27
5.1.50.0330.03712.27
5.1.40.0330.02712.27
5.1.30.0370.04312.27
5.1.20.0370.05012.27
5.1.10.0470.04312.27
5.1.00.0400.02012.27
5.0.50.0130.04712.27
5.0.40.0170.02012.27
5.0.30.0130.04712.27
5.0.20.0200.04012.27
5.0.10.0230.01312.27
5.0.00.0200.05712.27
4.4.90.0130.03712.27
4.4.80.0170.01312.27
4.4.70.0170.04012.27
4.4.60.0170.02312.27
4.4.50.0230.01712.27
4.4.40.0200.03712.27
4.4.30.0170.02312.27
4.4.20.0130.03712.27
4.4.10.0170.02312.27
4.4.00.0170.05012.27
4.3.110.0170.03012.27
4.3.100.0170.01312.27
4.3.90.0170.03012.27
4.3.80.0170.03312.27
4.3.70.0130.02312.27
4.3.60.0130.03312.27
4.3.50.0170.01712.27
4.3.40.0200.03312.27
4.3.30.0070.02312.27
4.3.20.0130.01712.27
4.3.10.0100.01712.28
4.3.00.0100.01712.29

preferences:
28.88 ms | 403 KiB | 5 Q