3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello world; This is a nice day; after"; $str = explode(";",$string); $size=sizeof($str); $newstr = $str[$size-1]." ".substr($string, 0, strrpos($string, ";"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dlnm1
function name:  (null)
number of ops:  23
compiled vars:  !0 = $string, !1 = $str, !2 = $size, !3 = $newstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Hello+world%3B+This+is+a+nice+day%3B+after'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3B'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6        COUNT                                            ~7      !1
          7        ASSIGN                                                   !2, ~7
    8     8        SUB                                              ~9      !2, 1
          9        FETCH_DIM_R                                      ~10     !1, ~9
         10        CONCAT                                           ~11     ~10, '+'
         11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 0
         14        INIT_FCALL                                               'strrpos'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 '%3B'
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
         19        DO_ICALL                                         $13     
         20        CONCAT                                           ~14     ~11, $13
         21        ASSIGN                                                   !3, ~14
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.35 ms | 1386 KiB | 19 Q