3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rawArray = array("A"=>"['B' => 3, 'C' => 5, 'D' => 9],", "B"=>"['A' => 3, 'C' => 3, 'D' => 4, 'E' => 7],", "C"=>"['A' => 5, 'B' => 3, 'D' => 2, 'E' => 6, 'F' => 3],", "D"=>"['A' => 9, 'B' => 4, 'C' => 2, 'E' => 2, 'F' => 2],", "E"=>"['B' => 7, 'C' => 6, 'D' => 2, 'F' => 5],", "F"=>"['C' => 3, 'D' => 2, 'E' => 5],", ); foreach($rawArray as $k => $v){ preg_match_all("/\'(.)\'/", $v, $key); preg_match_all("/=> (\d)/", $v, $val); $graph[$k] = array_combine($key[1], $val[1]); } print_r($graph);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 23
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/s2jIn
function name:  (null)
number of ops:  28
compiled vars:  !0 = $rawArray, !1 = $v, !2 = $k, !3 = $key, !4 = $val, !5 = $graph
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $7      !0, ->23
          2    > > FE_FETCH_R                                       ~8      $7, !1, ->23
          3    >   ASSIGN                                                   !2, ~8
   10     4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAL                                                 '%2F%5C%27%28.%29%5C%27%2F'
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !3
          8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'preg_match_all'
         10        SEND_VAL                                                 '%2F%3D%3E+%28%5Cd%29%2F'
         11        SEND_VAR                                                 !1
         12        SEND_REF                                                 !4
         13        DO_ICALL                                                 
   12    14        INIT_FCALL                                               'array_combine'
         15        FETCH_DIM_R                                      ~13     !3, 1
         16        SEND_VAL                                                 ~13
         17        FETCH_DIM_R                                      ~14     !4, 1
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                         $15     
         20        ASSIGN_DIM                                               !5, !2
         21        OP_DATA                                                  $15
    9    22      > JMP                                                      ->2
         23    >   FE_FREE                                                  $7
   14    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !5
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.92 ms | 1401 KiB | 19 Q