3v4l.org

run code in 300+ PHP versions simultaneously
<?php $img_str = file_get_contents('http://lorempixel.com/output/technics-q-c-640-480-6.jpg'); $image = imagecreatefromstring($img_str); $w = imagesx($image); $h = imagesy($image); echo $w.'px '.$h.'px';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsIDE
function name:  (null)
number of ops:  21
compiled vars:  !0 = $img_str, !1 = $image, !2 = $w, !3 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 'http%3A%2F%2Florempixel.com%2Foutput%2Ftechnics-q-c-640-480-6.jpg'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    5     4        INIT_FCALL_BY_NAME                                       'imagecreatefromstring'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
    6     8        INIT_FCALL_BY_NAME                                       'imagesx'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $8      
         11        ASSIGN                                                   !2, $8
    7    12        INIT_FCALL_BY_NAME                                       'imagesy'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $10     
         15        ASSIGN                                                   !3, $10
    9    16        CONCAT                                           ~12     !2, 'px+'
         17        CONCAT                                           ~13     ~12, !3
         18        CONCAT                                           ~14     ~13, 'px'
         19        ECHO                                                     ~14
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.33 ms | 1395 KiB | 15 Q