3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scripts="php|"; echo substr($scripts,strlen($scripts)-2,1)."\n"; if(substr($scripts,strlen($scripts)-2,1)=="|") $scripts=substr($scripts,0,strlen($scripts)-1); echo $scripts;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 27
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/Jc28A
function name:  (null)
number of ops:  29
compiled vars:  !0 = $scripts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'php%7C'
    3     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        STRLEN                                           ~2      !0
          4        SUB                                              ~3      ~2, 2
          5        SEND_VAL                                                 ~3
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $4      
          8        CONCAT                                           ~5      $4, '%0A'
          9        ECHO                                                     ~5
    4    10        INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !0
         12        STRLEN                                           ~6      !0
         13        SUB                                              ~7      ~6, 2
         14        SEND_VAL                                                 ~7
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $8      
         17        IS_EQUAL                                                 $8, '%7C'
         18      > JMPZ                                                     ~9, ->27
    5    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 0
         22        STRLEN                                           ~10     !0
         23        SUB                                              ~11     ~10, 1
         24        SEND_VAL                                                 ~11
         25        DO_ICALL                                         $12     
         26        ASSIGN                                                   !0, $12
    6    27    >   ECHO                                                     !0
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.46 ms | 1387 KiB | 15 Q