3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EmbedRandomize { var $listapi; public function dataAPI(){ if(!empty($this->listapi)){ $api = explode(',',$this->listapi); return $api; } return []; } public function isContains($match,$string){ if(strpos($string,$match) !== false){ return true; } return false; } public function isInternalEmbed($embed){ $api = $this->dataAPI(); if(!empty($api)){ foreach($api as $value){ $plugins = str_replace('/api','/plugins',trim($value)); if($this->isContains($plugins,$embed)){ return true; } } } return false; } public function randomize($embed){ $api = $this->dataAPI(); $numserver = mt_rand(0,(count($api)-1)); $data = str_replace('/api','/plugins',trim($api[$numserver])); $list = array(); foreach($this->dataAPI() as $value){ $list[] = str_replace('/api','/plugins',trim($value)); } return str_replace($list,$data,$embed); } public function modify($embed){ if($this->isInternalEmbed($embed)){ return $this->randomize($embed); } return $embed; } } $apiconfig = 'https://server.omovv.com/api, https://node1.omovv.com/api'; $embed = '<iframe src="https://server.omovv.com/plugins/openload/embed.php?id=2GqeLBWdH61NiJuXNrfChmCoM8s7InY0nh9y7d2g2AoXhoRwE4hbyIJxvAtLdbH70zNq1VAHDLphboTenncx68hn7mcN7FODrBWGSuix" frameborder="0" scrolling="no" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>'; $embed2 = '<iframe src="https://oload.stream/plugins/openload/embed.php?id=2GqeLBWdH61NiJuXNrfChmCoM8s7InY0nh9y7d2g2AoXhoRwE4hbyIJxvAtLdbH70zNq1VAHDLphboTenncx68hn7mcN7FODrBWGSuix" frameborder="0" scrolling="no" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>'; $video = new EmbedRandomize(); $video->listapi = $apiconfig; echo $video->modify($embed2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKoiq
function name:  (null)
number of ops:  13
compiled vars:  !0 = $apiconfig, !1 = $embed, !2 = $embed2, !3 = $video
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fserver.omovv.com%2Fapi%2C+https%3A%2F%2Fnode1.omovv.com%2Fapi'
   54     1        ASSIGN                                                   !1, '%3Ciframe+src%3D%22https%3A%2F%2Fserver.omovv.com%2Fplugins%2Fopenload%2Fembed.php%3Fid%3D2GqeLBWdH61NiJuXNrfChmCoM8s7InY0nh9y7d2g2AoXhoRwE4hbyIJxvAtLdbH70zNq1VAHDLphboTenncx68hn7mcN7FODrBWGSuix%22+frameborder%3D%220%22+scrolling%3D%22no%22+allowfullscreen%3D%22true%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E'
   56     2        ASSIGN                                                   !2, '%3Ciframe+src%3D%22https%3A%2F%2Foload.stream%2Fplugins%2Fopenload%2Fembed.php%3Fid%3D2GqeLBWdH61NiJuXNrfChmCoM8s7InY0nh9y7d2g2AoXhoRwE4hbyIJxvAtLdbH70zNq1VAHDLphboTenncx68hn7mcN7FODrBWGSuix%22+frameborder%3D%220%22+scrolling%3D%22no%22+allowfullscreen%3D%22true%22+webkitallowfullscreen%3D%22true%22+mozallowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E'
   58     3        NEW                                              $7      'EmbedRandomize'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !3, $7
   59     6        ASSIGN_OBJ                                               !3, 'listapi'
          7        OP_DATA                                                  !0
   60     8        INIT_METHOD_CALL                                         !3, 'modify'
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $11     
         11        ECHO                                                     $11
         12      > RETURN                                                   1

Class EmbedRandomize:
Function dataapi:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKoiq
function name:  dataAPI
number of ops:  12
compiled vars:  !0 = $api
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ISSET_ISEMPTY_PROP_OBJ                           ~1      'listapi'
          1        BOOL_NOT                                         ~2      ~1
          2      > JMPZ                                                     ~2, ->10
    7     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2C'
          5        FETCH_OBJ_R                                      ~3      'listapi'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !0, $4
    8     9      > RETURN                                                   !0
   10    10    > > RETURN                                                   <array>
   11    11*     > RETURN                                                   null

End of function dataapi

Function iscontains:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKoiq
function name:  isContains
number of ops:  11
compiled vars:  !0 = $match, !1 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        TYPE_CHECK                                  1018          $2
          7      > JMPZ                                                     ~3, ->9
   15     8    > > RETURN                                                   <true>
   17     9    > > RETURN                                                   <false>
   18    10*     > RETURN                                                   null

End of function iscontains

Function isinternalembed:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 27
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 26
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 26
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 27
filename:       /in/vKoiq
function name:  isInternalEmbed
number of ops:  29
compiled vars:  !0 = $embed, !1 = $api, !2 = $value, !3 = $plugins
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        INIT_METHOD_CALL                                         'dataAPI'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !1, $4
   22     4        ISSET_ISEMPTY_CV                                 ~6      !1
          5        BOOL_NOT                                         ~7      ~6
          6      > JMPZ                                                     ~7, ->27
   23     7    > > FE_RESET_R                                       $8      !1, ->26
          8    > > FE_FETCH_R                                               $8, !2, ->26
   24     9    >   INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 '%2Fapi'
         11        SEND_VAL                                                 '%2Fplugins'
         12        INIT_FCALL                                               'trim'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
   25    18        INIT_METHOD_CALL                                         'isContains'
         19        SEND_VAR_EX                                              !3
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0  $12     
         22      > JMPZ                                                     $12, ->25
   26    23    >   FE_FREE                                                  $8
         24      > RETURN                                                   <true>
   23    25    > > JMP                                                      ->8
         26    >   FE_FREE                                                  $8
   30    27    > > RETURN                                                   <false>
   31    28*     > RETURN                                                   null

End of function isinternalembed

Function randomize:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 37
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 37
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/vKoiq
function name:  randomize
number of ops:  45
compiled vars:  !0 = $embed, !1 = $api, !2 = $numserver, !3 = $data, !4 = $list, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
   34     1        INIT_METHOD_CALL                                         'dataAPI'
          2        DO_FCALL                                      0  $6      
          3        ASSIGN                                                   !1, $6
   35     4        INIT_FCALL                                               'mt_rand'
          5        SEND_VAL                                                 0
          6        COUNT                                            ~8      !1
          7        SUB                                              ~9      ~8, 1
          8        SEND_VAL                                                 ~9
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !2, $10
   36    11        INIT_FCALL                                               'str_replace'
         12        SEND_VAL                                                 '%2Fapi'
         13        SEND_VAL                                                 '%2Fplugins'
         14        INIT_FCALL                                               'trim'
         15        FETCH_DIM_R                                      ~12     !1, !2
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                         $13     
         18        SEND_VAR                                                 $13
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !3, $14
   37    21        ASSIGN                                                   !4, <array>
   38    22        INIT_METHOD_CALL                                         'dataAPI'
         23        DO_FCALL                                      0  $17     
         24      > FE_RESET_R                                       $18     $17, ->37
         25    > > FE_FETCH_R                                               $18, !5, ->37
   39    26    >   INIT_FCALL                                               'str_replace'
         27        SEND_VAL                                                 '%2Fapi'
         28        SEND_VAL                                                 '%2Fplugins'
         29        INIT_FCALL                                               'trim'
         30        SEND_VAR                                                 !5
         31        DO_ICALL                                         $20     
         32        SEND_VAR                                                 $20
         33        DO_ICALL                                         $21     
         34        ASSIGN_DIM                                               !4
         35        OP_DATA                                                  $21
   38    36      > JMP                                                      ->25
         37    >   FE_FREE                                                  $18
   41    38        INIT_FCALL                                               'str_replace'
         39        SEND_VAR                                                 !4
         40        SEND_VAR                                                 !3
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                         $22     
         43      > RETURN                                                   $22
   42    44*     > RETURN                                                   null

End of function randomize

Function modify:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vKoiq
function name:  modify
number of ops:  11
compiled vars:  !0 = $embed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
   45     1        INIT_METHOD_CALL                                         'isInternalEmbed'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ                                                     $1, ->9
   46     5    >   INIT_METHOD_CALL                                         'randomize'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $2      
          8      > RETURN                                                   $2
   48     9    > > RETURN                                                   !0
   49    10*     > RETURN                                                   null

End of function modify

End of class EmbedRandomize.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.64 ms | 1408 KiB | 23 Q