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);

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.4.10.0090.00914.66
7.4.00.0090.00815.01
7.3.130.0070.00714.82
7.3.120.0070.01115.06
7.3.110.0020.01514.73
7.3.100.0020.01314.88
7.3.90.0050.00714.66
7.3.80.0070.00414.78
7.3.70.0070.00714.78
7.3.60.0120.00414.70
7.3.50.0020.00914.64
7.3.40.0120.00514.76
7.3.30.0060.00614.87
7.3.20.0080.00516.66
7.3.10.0040.01016.70
7.3.00.0070.00816.69
7.2.260.0150.00314.90
7.2.250.0100.00915.30
7.2.240.0070.01115.31
7.2.230.0040.01415.23
7.2.220.0050.01114.95
7.2.210.0040.00615.21
7.2.200.0090.00614.97
7.2.190.0050.00915.12
7.2.180.0050.00815.03
7.2.170.0050.00815.08
7.2.160.0050.00715.05
7.2.150.0040.00816.85
7.2.140.0100.00416.87
7.2.130.0050.00816.89
7.2.120.0070.00616.96
7.2.110.0090.00816.23
7.2.100.0120.00716.43
7.2.90.0100.00816.44
7.2.80.0130.00716.30
7.2.70.0140.00816.37
7.2.60.0140.01216.49
7.2.50.0100.00816.49
7.2.40.0160.00916.54
7.2.30.0180.00516.44
7.2.20.0130.00816.40
7.2.10.0190.00316.42
7.2.00.0150.00616.43
7.1.330.0080.00615.61
7.1.320.0050.01115.74
7.1.310.0050.00415.69
7.1.300.0060.00715.78
7.1.290.0060.00915.73
7.1.280.0040.01215.74
7.1.270.0040.01115.77
7.1.260.0070.00715.74
7.1.250.0060.00615.54
7.1.240.0040.00715.72
7.1.230.0200.00714.81
7.1.220.0170.00814.94
7.1.210.0170.00614.79
7.1.200.0170.00714.97
7.1.190.0160.00814.76
7.1.180.0170.01014.91
7.1.170.0180.01014.88
7.1.160.0190.00514.80
7.1.150.0180.01014.64
7.1.140.0180.00714.87
7.1.130.0190.00814.91
7.1.120.0330.01014.90
7.1.110.0310.01214.89
7.1.100.0360.00814.56
7.1.90.0330.00814.51
7.1.80.0410.00714.49
7.1.70.0370.00714.72
7.1.60.0490.01223.73
7.1.50.0540.00723.68
7.1.40.0540.00923.80
7.1.30.0440.01023.84
7.1.20.0540.00823.67
7.1.10.0240.01114.73
7.1.00.0360.01314.70
7.0.330.0060.00615.32
7.0.320.0080.00615.07
7.0.310.0080.00415.21
7.0.300.0040.00715.42
7.0.290.0030.01015.36
7.0.280.0060.00615.34
7.0.270.0000.01415.29
7.0.260.0070.01115.24
7.0.250.0050.00515.10
7.0.240.0070.00715.41
7.0.230.0040.00815.31
7.0.220.0100.00015.41
7.0.210.0000.00915.20
7.0.200.0080.00515.42
7.0.190.0040.00715.17
7.0.180.0040.00815.33
7.0.170.0050.00315.54
7.0.160.0000.01015.27
7.0.150.0080.00515.41
7.0.140.0060.00915.38
7.0.130.0030.01315.17
7.0.120.0090.00315.41
7.0.110.0060.00315.27
7.0.100.0030.00915.49
7.0.90.0100.00315.37
7.0.80.0000.01515.41
7.0.70.0050.00515.63
7.0.60.0040.01114.97
7.0.50.0000.01315.11
7.0.40.0030.00713.29
7.0.30.0030.00913.36
7.0.20.0090.00613.52
7.0.10.0090.00313.61
7.0.00.0120.00413.31
5.6.400.0040.01114.34
5.6.390.0000.00814.00
5.6.380.0060.00714.32
5.6.370.0060.00614.62
5.6.360.0000.00814.75
5.6.350.0070.00714.36
5.6.340.0040.01114.52
5.6.330.0080.00414.58
5.6.320.0000.01414.12
5.6.310.0090.00314.34
5.6.300.0100.00014.46
5.6.290.0000.00914.61
5.6.280.0060.00614.23
5.6.270.0110.00414.73
5.6.260.0040.01114.23
5.6.250.0030.01014.40
5.6.240.0090.00614.35
5.6.230.0040.01114.65
5.6.220.0040.00714.40
5.6.210.0030.01014.27
5.6.200.0000.01414.60
5.6.190.0090.00314.29
5.6.180.0060.01214.27
5.6.170.0050.00514.56
5.6.160.0040.00714.37
5.6.150.0040.01214.48
5.6.140.0070.01014.75
5.6.130.0070.00714.20
5.6.120.0030.01014.39
5.6.110.0030.00714.07
5.6.100.0120.00014.26
5.6.90.0100.00613.98
5.6.80.0070.00713.98
5.6.70.0040.01114.12
5.6.60.0040.00814.00
5.6.50.0060.00914.50
5.6.40.0030.01314.29
5.6.30.0120.00014.26
5.6.20.0070.01014.12
5.6.10.0060.00314.39
5.6.00.0040.00714.34

preferences:
37.27 ms | 401 KiB | 5 Q