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; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/shnts
function name:  (null)
number of ops:  17
compiled vars:  !0 = $json, !1 = $arr, !2 = $magnetism, !3 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22Hydrogen%22%3A%22Diamagnetic%22%2C%22Niobium%22%3A%22N%2FA%22%2C%22Thallium%22%3A%22Diamagnetic%22%2C%22Helium%22%3A%22Diamagnetic%22%2C%22Molybdenum%22%3A%22Paramagnetic%22%2C%22Lead%22%3A%22Diamagnetic%22%2C%22Lithium%22%3A%22Paramagnetic%22%2C%22Technetium%22%3A%22N%2FA%22%2C%22Bismuth%22%3A%22Diamagnetic%22%2C%22Beryllium%22%3A%22Diamagnetic%22%2C%22Ruthenium%22%3A%22Paramagnetic%22%2C%22Polonium%22%3A%22N%2FA%22%2C%22Boron%22%3A%22Diamagnetic%22%2C%22Rhodium%22%3A%22Paramagnetic%22%2C%22Astatine%22%3A%22N%2FA%22%2C%22Carbon%22%3A%22Diamagnetic%22%2C%22Palladium%22%3A%22Paramagnetic%22%2C%22Radon%22%3A%22N%2FA%22%2C%22Nitrogen%22%3A%22Diamagnetic%22%2C%22Silver%22%3A%22Diamagnetic%22%2C%22Francium%22%3A%22N%2FA%22%2C%22Oxygen%22%3A%22Paramagnetic%22%2C%22Cadmium%22%3A%22Diamagnetic%22%2C%22Radium%22%3A%22N%2FA%22%2C%22Fluorine%22%3A%22N%2FA%22%2C%22Indium%22%3A%22Diamagnetic%22%2C%22Actinium%22%3A%22N%2FA%22%2C%22Neon%22%3A%22Diamagnetic%22%2C%22Tin%22%3A%22Paramagnetic%22%2C%22Thorium%22%3A%22N%2FA%22%2C%22Sodium%22%3A%22Paramagnetic%22%2C%22Antimony%22%3A%22Diamagnetic%22%2C%22Protactinium%22%3A%22N%2FA%22%2C%22Magnesium%22%3A%22Paramagnetic%22%2C%22Tellurium%22%3A%22Diamagnetic%22%2C%22Uranium%22%3A%22N%2FA%22%2C%22Aluminum%22%3A%22Paramagnetic%22%2C%22Iodine%22%3A%22N%2FA%22%2C%22Neptunium%22%3A%22N%2FA%22%2C%22Silicon%22%3A%22Diamagnetic%22%2C%22Xenon%22%3A%22Diamagnetic%22%2C%22Plutonium%22%3A%22N%2FA%22%2C%22Phosphorus%22%3A%22Diamagnetic%22%2C%22Cesium%22%3A%22N%2FA%22%2C%22Americium%22%3A%22N%2FA%22%2C%22Sulfur%22%3A%22Diamagnetic%22%2C%22Barium%22%3A%22Paramagnetic%22%2C%22Curium%22%3A%22N%2FA%22%2C%22Chlorine%22%3A%22Diamagnetic%22%2C%22Lanthanum%22%3A%22N%2FA%22%2C%22Berkelium%22%3A%22N%2FA%22%2C%22Argon%22%3A%22Diamagnetic%22%2C%22Cerium%22%3A%22Paramagnetic%22%2C%22Californium%22%3A%22N%2FA%22%2C%22Potassium%22%3A%22N%2FA%22%2C%22Praseodymium%22%3A%22N%2FA%22%2C%22Einsteinium%22%3A%22N%2FA%22%2C%22Calcium%22%3A%22Paramagnetic%22%2C%22Neodymium%22%3A%22Paramagnetic%22%2C%22Fermium%22%3A%22N%2FA%22%2C%22Scandium%22%3A%22N%2FA%22%2C%22Promethium%22%3A%22N%2FA%22%2C%22Mendelevium%22%3A%22N%2FA%22%2C%22Titanium%22%3A%22Paramagnetic%22%2C%22Samarium%22%3A%22Paramagnetic%22%2C%22Nobelium%22%3A%22N%2FA%22%2C%22Vanadium%22%3A%22N%2FA%22%2C%22Europium%22%3A%22Paramagnetic%22%2C%22Lawrencium%22%3A%22N%2FA%22%2C%22Chromium%22%3A%22Antiferromagnetic%22%2C%22Gadolinium%22%3A%22Ferromagnetic%22%2C%22Rutherfordium%22%3A%22N%2FA%22%2C%22Manganese%22%3A%22Paramagnetic%22%2C%22Terbium%22%3A%22Paramagnetic%22%2C%22Dubnium%22%3A%22N%2FA%22%2C%22Iron%22%3A%22Ferromagnetic%22%2C%22Dysprosium%22%3A%22Paramagnetic%22%2C%22Seaborgium%22%3A%22N%2FA%22%2C%22Cobalt%22%3A%22Ferromagnetic%22%2C%22Holmium%22%3A%22Paramagnetic%22%2C%22Bohrium%22%3A%22N%2FA%22%2C%22Nickel%22%3A%22Ferromagnetic%22%2C%22Erbium%22%3A%22Paramagnetic%22%2C%22Hassium%22%3A%22N%2FA%22%2C%22Copper%22%3A%22Diamagnetic%22%2C%22Thulium%22%3A%22Paramagnetic%22%2C%22Meitnerium%22%3A%22N%2FA%22%2C%22Zinc%22%3A%22Diamagnetic%22%2C%22Ytterbium%22%3A%22N%2FA%22%2C%22Darmstadtium%22%3A%22N%2FA%22%2C%22Gallium%22%3A%22Diamagnetic%22%2C%22Lutetium%22%3A%22N%2FA%22%2C%22Roentgenium%22%3A%22N%2FA%22%2C%22Germanium%22%3A%22Diamagnetic%22%2C%22Hafnium%22%3A%22N%2FA%22%2C%22Ununbium%22%3A%22N%2FA%22%2C%22Arsenic%22%3A%22Diamagnetic%22%2C%22Tantalum%22%3A%22N%2FA%22%2C%22Ununtrium%22%3A%22N%2FA%22%2C%22Selenium%22%3A%22Diamagnetic%22%2C%22Tungsten%22%3A%22Paramagnetic%22%2C%22Ununquadium%22%3A%22N%2FA%22%2C%22Bromine%22%3A%22Diamagnetic%22%2C%22Rhenium%22%3A%22N%2FA%22%2C%22Ununpentium%22%3A%22N%2FA%22%2C%22Krypton%22%3A%22Diamagnetic%22%2C%22Osmium%22%3A%22Paramagnetic%22%2C%22Ununhexium%22%3A%22N%2FA%22%2C%22Rubidium%22%3A%22N%2FA%22%2C%22Iridium%22%3A%22Paramagnetic%22%2C%22Ununseptium%22%3A%22N%2FA%22%2C%22Strontium%22%3A%22Paramagnetic%22%2C%22Platinum%22%3A%22Paramagnetic%22%2C%22Ununoctium%22%3A%22N%2FA%22%2C%22Yttrium%22%3A%22N%2FA%22%2C%22Gold%22%3A%22Diamagnetic%22%2C%22Zirconium%22%3A%22Paramagnetic%22%2C%22Mercury%22%3A%22Diamagnetic%22%7D'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    7     6        INIT_FCALL                                               'sort'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                                 
    9     9      > FE_RESET_R                                       $8      !1, ->15
         10    > > FE_FETCH_R                                       ~9      $8, !2, ->15
         11    >   ASSIGN                                                   !3, ~9
   10    12        CONCAT                                           ~11     !2, '%0A'
         13        ECHO                                                     ~11
    9    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $8
   11    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.81 ms | 1465 KiB | 15 Q