3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { const CLOSED_CAPTION_MIME_TYPES = [ 'srt' => 'text/srt', 'scc' => 'text/scc', 'webvtt' => 'text/vtt', ]; public function testStatic($tag) { return !empty(static::CLOSED_CAPTION_MIME_TYPES[$tag]); } } $instance = new TestClass(); echo $instance->testStatic('srt');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZKXHQ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'TestClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'testStatic'
          4        SEND_VAL_EX                                              'srt'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class TestClass:
Function teststatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZKXHQ
function name:  testStatic
number of ops:  6
compiled vars:  !0 = $tag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        FETCH_CLASS_CONSTANT                             ~1      'CLOSED_CAPTION_MIME_TYPES'
          2        ISSET_ISEMPTY_DIM_OBJ                         1  ~2      ~1, !0
          3        BOOL_NOT                                         ~3      ~2
          4      > RETURN                                                   ~3
   12     5*     > RETURN                                                   null

End of function teststatic

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144 ms | 1393 KiB | 13 Q