3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string1 = '123456789'; $string2 = '135792468'; $stringParts1 = str_split($string1); sort($stringParts1); $stringParts2 = str_split($string2); sort($stringParts2); if( $stringParts1 == $stringParts2){ echo 'strings are a reorder'; }else{ echo 'strings are not a reorder'; };
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lhPNm
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string1, !1 = $string2, !2 = $stringParts1, !3 = $stringParts2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '123456789'
    4     1        ASSIGN                                                       !1, '135792468'
    6     2        INIT_FCALL                                                   'str_split'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $6      
          5        ASSIGN                                                       !2, $6
    7     6        INIT_FCALL                                                   'sort'
          7        SEND_REF                                                     !2
          8        DO_ICALL                                                     
    9     9        INIT_FCALL                                                   'str_split'
         10        SEND_VAR                                                     !1
         11        DO_ICALL                                             $9      
         12        ASSIGN                                                       !3, $9
   10    13        INIT_FCALL                                                   'sort'
         14        SEND_REF                                                     !3
         15        DO_ICALL                                                     
   12    16        IS_EQUAL                                                     !2, !3
         17      > JMPZ                                                         ~12, ->20
   13    18    >   ECHO                                                         'strings+are+a+reorder'
   12    19      > JMP                                                          ->21
   15    20    >   ECHO                                                         'strings+are+not+a+reorder'
   16    21    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.45 ms | 2562 KiB | 15 Q