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($embed);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.110.0310.01114.75
7.2.100.0410.00514.75
7.2.90.0480.00814.93
7.2.80.0380.00514.57
7.2.70.0310.00514.99
7.2.60.0600.01115.14
7.2.50.0510.00815.11
7.2.40.0430.00614.99
7.2.30.0590.00615.26
7.2.20.0610.01014.95
7.2.10.0430.01114.99
7.2.00.0430.00614.90
7.1.230.0460.00614.05
7.1.220.0330.00714.03
7.1.210.0410.00813.92
7.1.200.0310.00713.89
7.1.190.0340.00513.84
7.1.180.0460.00813.92
7.1.170.0580.00513.88
7.1.160.0590.00513.85
7.1.150.0540.00313.89
7.1.140.0780.01013.88
7.1.130.0350.00614.11
7.1.120.0440.00513.84
7.1.110.0350.00613.84
7.1.100.0800.00613.66
7.1.90.0420.01013.62
7.1.80.0420.00713.67
7.1.70.0330.01113.76
7.1.60.0500.01131.72
7.1.50.0670.01531.69
7.1.40.0710.01431.67
7.1.30.0730.00731.80
7.1.20.0710.00931.82
7.1.10.0690.00313.79
7.1.00.0490.00513.76
5.6.380.0050.00814.38

preferences:
29.09 ms | 401 KiB | 5 Q