3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Case 1: $DatabaseName = "Jardine Lloyd Thompson"; $BankName = "Thompson Jardine Lloyd"; $data = explode(" ", $DatabaseName); $bank = explode(" ", $BankName); sort($data); sort($bank); Var_export(($data == $bank)); //Case 2 $DatabaseName = "Jardine Lloyd Thompson"; $BankName = "Thoapson Jordine Llayd"; $data = explode(" ", $DatabaseName); $bank = explode(" ", $BankName); sort($data); sort($bank); $lev = 0; foreach($data as $key => $name){ $lev += levenshtein($name, $bank[$key]); } echo PHP_EOL . $lev;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 42, Position 2 = 51
Branch analysis from position: 42
2 jumps found. (Code = 78) Position 1 = 43, Position 2 = 51
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
filename:       /in/eP5PE
function name:  (null)
number of ops:  55
compiled vars:  !0 = $DatabaseName, !1 = $BankName, !2 = $data, !3 = $bank, !4 = $lev, !5 = $name, !6 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Jardine+Lloyd+Thompson'
    5     1        ASSIGN                                                   !1, 'Thompson+Jardine+Lloyd'
    7     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !2, $9
    8     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '+'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !3, $11
    9    12        INIT_FCALL                                               'sort'
         13        SEND_REF                                                 !2
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'sort'
         16        SEND_REF                                                 !3
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'var_export'
         19        IS_EQUAL                                         ~15     !2, !3
         20        SEND_VAL                                                 ~15
         21        DO_ICALL                                                 
   14    22        ASSIGN                                                   !0, 'Jardine+Lloyd+Thompson'
   15    23        ASSIGN                                                   !1, 'Thoapson+Jordine+Llayd'
   17    24        INIT_FCALL                                               'explode'
         25        SEND_VAL                                                 '+'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $19     
         28        ASSIGN                                                   !2, $19
   18    29        INIT_FCALL                                               'explode'
         30        SEND_VAL                                                 '+'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                         $21     
         33        ASSIGN                                                   !3, $21
   19    34        INIT_FCALL                                               'sort'
         35        SEND_REF                                                 !2
         36        DO_ICALL                                                 
   20    37        INIT_FCALL                                               'sort'
         38        SEND_REF                                                 !3
         39        DO_ICALL                                                 
   22    40        ASSIGN                                                   !4, 0
   23    41      > FE_RESET_R                                       $26     !2, ->51
         42    > > FE_FETCH_R                                       ~27     $26, !5, ->51
         43    >   ASSIGN                                                   !6, ~27
   24    44        INIT_FCALL                                               'levenshtein'
         45        SEND_VAR                                                 !5
         46        FETCH_DIM_R                                      ~29     !3, !6
         47        SEND_VAL                                                 ~29
         48        DO_ICALL                                         $30     
         49        ASSIGN_OP                                     1          !4, $30
   23    50      > JMP                                                      ->42
         51    >   FE_FREE                                                  $26
   27    52        CONCAT                                           ~32     '%0A', !4
         53        ECHO                                                     ~32
   28    54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.4 ms | 1018 KiB | 17 Q