3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'I only want the first 60 words of $output that has been uploaded 100 words to the database to be shown on my page, what is the simplest way for me to do this? I want $output[]="description to only fetch first 60 words from the database. ** I have tried a lot method but isnt working for me** I only want the first 60 words of $output that has been uploaded 100 words to the database to be shown on my page, what is the simplest way for me to do this? I want $output[]="description to only fetch first 60 words from the database. ** I have tried a lot method but isnt working for me**'; echo count(explode(" ", $str)) . " words in string\n\n"; echo "first 60 is:\n" . implode(" ", array_slice(explode(" ", $str), 0, 60));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D4nqJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'I+only+want+the+first+60+words+of+%24output+that+has+been+uploaded+100+words+to+the+database+to+be+shown+on+my+page%2C+what+is+the+simplest+way+for+me+to+do+this%3F%0A%0AI+want+%24output%5B%5D%3D%22description+to+only+fetch+first+60+words+from+the+database.+%2A%2A+I+have+tried+a+lot+method+but+isnt+working+for+me%2A%2A%0AI+only+want+the+first+60+words+of+%24output+that+has+been+uploaded+100+words+to+the+database+to+be+shown+on+my+page%2C+what+is+the+simplest+way+for+me+to+do+this%3F%0A%0AI+want+%24output%5B%5D%3D%22description+to+only+fetch+first+60+words+from+the+database.+%2A%2A+I+have+tried+a+lot+method+but+isnt+working+for+me%2A%2A'
   10     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '+'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $2      
          5        COUNT                                                ~3      $2
          6        CONCAT                                               ~4      ~3, '+words+in+string%0A%0A'
          7        ECHO                                                         ~4
   12     8        INIT_FCALL                                                   'array_slice'
          9        INIT_FCALL                                                   'explode'
         10        SEND_VAL                                                     '+'
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $5      
         13        SEND_VAR                                                     $5
         14        SEND_VAL                                                     0
         15        SEND_VAL                                                     60
         16        DO_ICALL                                             $6      
         17        FRAMELESS_ICALL_2                implode             ~7      '+', $6
         18        CONCAT                                               ~8      'first+60+is%3A%0A', ~7
         19        ECHO                                                         ~8
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
181.13 ms | 2187 KiB | 15 Q