3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EmbedRandomize { var $listapi; function __construct($api=null) { if (!empty($api)) $this->listapi = $api; } 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.4.10.0140.00716.59
7.4.00.0030.01716.48
7.3.130.0170.00316.54
7.3.120.0060.01115.57
7.3.110.0050.01115.78
7.3.100.0100.00715.72
7.3.90.0070.00715.75
7.3.80.0070.01015.60
7.3.70.0030.01015.71
7.3.60.0060.00715.71
7.3.50.0030.01015.64
7.3.40.0070.00515.57
7.3.30.0070.00715.65
7.3.20.0050.00917.35
7.3.10.0050.00917.46
7.3.00.0060.00817.05
7.2.260.0040.01216.58
7.2.250.0100.01316.86
7.2.240.0050.01115.91
7.2.230.0100.00715.88
7.2.220.0080.00515.74
7.2.210.0080.00815.99
7.2.200.0020.01015.69
7.2.190.0020.01115.79
7.2.180.0060.00815.97
7.2.170.0030.01015.79
7.2.160.0050.00815.89
7.2.150.0080.00517.66
7.2.140.0120.00117.67
7.2.130.0100.00517.49
7.2.120.0050.00917.42
7.2.110.0240.00816.76
7.2.100.0180.00816.81
7.2.90.0160.01016.82
7.2.80.0170.00816.74
7.2.70.0210.01116.65
7.2.60.0220.00916.86
7.2.50.0190.00616.94
7.2.40.0270.00516.83
7.2.30.0270.00816.72
7.2.20.0160.00916.81
7.2.10.0180.00916.78
7.2.00.0160.01116.83
7.1.330.0090.00516.49
7.1.320.0070.00516.76
7.1.310.0040.00916.74
7.1.300.0050.00916.67
7.1.290.0040.00816.46
7.1.280.0050.00916.55
7.1.270.0040.00716.51
7.1.260.0040.01016.39
7.1.250.0070.00516.30
7.1.240.0050.00816.43
7.1.230.0180.00615.58
7.1.220.0210.00915.61
7.1.210.0190.00715.76
7.1.200.0200.01115.69
7.1.190.0170.00815.75
7.1.180.0190.00915.62
7.1.170.0200.00715.75
7.1.160.0290.01015.58
7.1.150.0210.00815.63
7.1.140.0240.00915.63
7.1.130.0270.00615.66
7.1.120.0350.00715.54
7.1.110.0250.00715.73
7.1.100.0250.00915.50
7.1.90.0270.00915.49
7.1.80.0370.01015.69
7.1.70.0420.00815.63
7.1.60.0370.00621.57
7.1.50.0600.01021.64
7.1.40.0580.00721.59
7.1.30.1030.01121.76
7.1.20.0590.01221.63
7.1.10.0390.01015.58
7.1.00.0300.00615.55
7.0.330.0070.00715.95
7.0.320.0070.00716.93
7.0.310.0030.01116.89
7.0.300.0060.00917.17
7.0.290.0000.01417.01
7.0.280.0070.01017.04
7.0.270.0110.00417.05
7.0.260.0060.00616.92
7.0.250.0000.01017.22
7.0.240.0070.00717.01
7.0.230.0030.01317.09
7.0.220.0100.00317.11
7.0.210.0040.00817.11
7.0.200.0070.01116.84
7.0.190.0170.00016.83
7.0.180.0070.00717.12
7.0.170.0140.00316.92
7.0.160.0070.00717.17
7.0.150.0030.01216.96
7.0.140.0080.00416.99
7.0.130.0030.00717.05
7.0.120.0060.00617.08
7.0.110.0070.00717.08
7.0.100.0060.01217.14
7.0.90.0080.00817.10
7.0.80.0040.01117.02
7.0.70.0000.01216.96
7.0.60.0070.01016.92
7.0.50.0030.01017.13
7.0.40.0110.00415.06
7.0.30.0060.00314.89
7.0.20.0040.00814.91
7.0.10.0040.00815.06
7.0.00.0080.00815.02
5.6.400.0040.01116.13
5.6.390.0070.00316.25
5.6.380.0090.00414.83
5.6.370.0060.00616.19
5.6.360.0000.01616.30
5.6.350.0000.01316.43
5.6.340.0040.00716.13
5.6.330.0060.00915.93
5.6.320.0030.01216.14
5.6.310.0000.01615.75
5.6.300.0100.00316.11
5.6.290.0060.00616.02
5.6.280.0100.00316.04
5.6.270.0090.00616.08
5.6.260.0060.00616.08
5.6.250.0000.01516.04
5.6.240.0000.01015.99
5.6.230.0060.01016.30
5.6.220.0070.00416.09
5.6.210.0060.00616.07
5.6.200.0080.00816.14
5.6.190.0000.01715.98
5.6.180.0040.00715.95
5.6.170.0040.01115.80
5.6.160.0110.00415.90
5.6.150.0060.00915.92
5.6.140.0070.00716.01
5.6.130.0100.00316.31
5.6.120.0100.00315.86
5.6.110.0060.00916.07
5.6.100.0120.00615.89
5.6.90.0040.01115.99
5.6.80.0080.01116.04
5.6.70.0040.00815.89
5.6.60.0030.01015.90
5.6.50.0000.01216.08
5.6.40.0090.00315.98
5.6.30.0120.00316.14
5.6.20.0080.00616.18
5.6.10.0080.00415.89
5.6.00.0000.01415.84

preferences:
40.05 ms | 401 KiB | 5 Q