3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."; $str_len = strlen($str); $length = '150'; if($str_lenth >= $length){ echo substr($str,0,-147)."..."; } else { echo $str; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IiWWE
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str, !1 = $str_len, !2 = $length, !3 = $str_lenth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Lorem+Ipsum+is+simply+dummy+text+of+the+printing+and+typesetting+industry.+Lorem+Ipsum+has+been+the+industry%27s+standard+dummy+text+ever+since+the+1500s%2C+when+an+unknown+printer+took+a+galley+of+type+and+scrambled+it+to+make+a+type+specimen+book.+It+has+survived+not+only+five+centuries%2C+but+also+the+leap+into+electronic+typesetting%2C+remaining+essentially+unchanged.+It+was+popularised+in+the+1960s+with+the+release+of+Letraset+sheets+containing+Lorem+Ipsum+passages%2C+and+more+recently+with+desktop+publishing+software+like+Aldus+PageMaker+including+versions+of+Lorem+Ipsum.'
    7     1        STRLEN                                           ~5      !0
          2        ASSIGN                                                   !1, ~5
    8     3        ASSIGN                                                   !2, '150'
   10     4        IS_SMALLER_OR_EQUAL                                      !2, !3
          5      > JMPZ                                                     ~8, ->14
   11     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 -147
         10        DO_ICALL                                         $9      
         11        CONCAT                                           ~10     $9, '...'
         12        ECHO                                                     ~10
         13      > JMP                                                      ->15
   13    14    >   ECHO                                                     !0
   14    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.37 ms | 1395 KiB | 15 Q