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($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.0040.01816.41
7.4.00.0100.01016.67
7.3.130.0030.01516.66
7.3.120.0020.01115.79
7.3.110.0020.01215.43
7.3.100.0070.01015.68
7.3.90.0030.01215.59
7.3.80.0020.01115.45
7.3.70.0070.00515.79
7.3.60.0050.00515.60
7.3.50.0040.00715.55
7.3.40.0050.00815.68
7.3.30.0070.00515.63
7.3.20.0070.00517.37
7.3.10.0070.00717.25
7.3.00.0040.00817.14
7.2.260.0070.01316.47
7.2.250.0130.00716.75
7.2.240.0060.00815.88
7.2.230.0020.01315.86
7.2.220.0130.00216.02
7.2.210.0050.00815.96
7.2.200.0090.00615.88
7.2.190.0040.00915.91
7.2.180.0050.00815.85
7.2.170.0070.00515.87
7.2.160.0050.00715.88
7.2.150.0040.00917.59
7.2.140.0050.00617.62
7.2.130.0060.00617.45
7.2.120.0050.00617.39
7.2.110.0230.00816.72
7.2.100.0230.00816.73
7.2.90.0240.00816.83
7.2.80.0190.01216.80
7.2.70.0270.00516.86
7.2.60.0220.00916.77
7.2.50.0270.00616.91
7.2.40.0390.00816.85
7.2.30.0390.00416.78
7.2.20.0360.00516.79
7.2.10.0240.00916.79
7.2.00.0300.01016.69
7.1.330.0040.01216.66
7.1.320.0060.00616.53
7.1.310.0010.01016.63
7.1.300.0020.00916.61
7.1.290.0060.00816.70
7.1.280.0030.00716.68
7.1.270.0060.00516.60
7.1.260.0060.00616.63
7.1.250.0030.00916.31
7.1.240.0030.00617.32
7.1.230.0360.00515.58
7.1.220.0510.00715.57
7.1.210.0360.00715.59
7.1.200.0430.00915.54
7.1.190.0420.00815.54
7.1.180.0440.00515.64
7.1.170.0420.00815.50
7.1.160.0510.00715.46
7.1.150.0560.00815.55
7.1.140.0450.01115.69
7.1.130.0540.00815.55
7.1.120.0370.01315.71
7.1.110.0440.01215.70
7.1.100.0380.00915.36
7.1.90.0600.00715.52
7.1.80.0420.00915.57
7.1.70.0530.00515.50
7.1.60.0710.01024.62
7.1.50.0830.01224.41
7.1.40.0700.01024.56
7.1.30.0660.01024.70
7.1.20.0670.00724.62
7.1.10.0500.00815.50
7.1.00.0350.00815.66
7.0.330.0030.01016.81
7.0.320.0110.00017.08
7.0.310.0090.00917.13
7.0.300.0040.01517.03
7.0.290.0000.01716.90
7.0.280.0140.00416.96
7.0.270.0030.00916.89
7.0.260.0060.00917.00
7.0.250.0070.01417.01
7.0.240.0040.00817.10
7.0.230.0040.01116.94
7.0.220.0060.00616.91
7.0.210.0080.00616.89
7.0.200.0030.01017.19
7.0.190.0070.00317.04
7.0.180.0130.00316.96
7.0.170.0080.00816.97
7.0.160.0080.00816.87
7.0.150.0070.00717.06
7.0.140.0050.00517.04
7.0.130.0060.00317.20
7.0.120.0030.00617.04
7.0.110.0070.00717.03
7.0.100.0100.00317.02
7.0.90.0040.00716.97
7.0.80.0000.01016.97
7.0.70.0080.00816.94
7.0.60.0080.00417.07
7.0.50.0060.00916.99
7.0.40.0040.00914.93
7.0.30.0030.00715.03
7.0.20.0070.00714.98
7.0.10.0080.00314.93
7.0.00.0100.00914.92
5.6.400.0040.00716.10
5.6.390.0000.01316.19
5.6.380.0030.01115.30
5.6.370.0060.01216.18
5.6.360.0040.01215.73
5.6.350.0090.01015.72
5.6.340.0100.00616.15
5.6.330.0110.00015.97
5.6.320.0110.01115.68
5.6.310.0060.00915.81
5.6.300.0060.01016.10
5.6.290.0110.00416.28
5.6.280.0030.01315.89
5.6.270.0040.01116.05
5.6.260.0090.00616.01
5.6.250.0030.00716.05
5.6.240.0030.00915.96
5.6.230.0030.00716.05
5.6.220.0040.01215.96
5.6.210.0060.00616.20
5.6.200.0070.00716.09
5.6.190.0080.00315.95
5.6.180.0030.00715.83
5.6.170.0100.00316.10
5.6.160.0060.00916.05
5.6.150.0030.00816.07
5.6.140.0060.00615.77
5.6.130.0070.00715.91
5.6.120.0030.00916.29
5.6.110.0040.01115.79
5.6.100.0030.00616.15
5.6.90.0060.01216.25
5.6.80.0110.00415.71
5.6.70.0000.01816.00
5.6.60.0090.00616.07
5.6.50.0070.01015.93
5.6.40.0060.00916.10
5.6.30.0060.01215.87
5.6.20.0060.00615.90
5.6.10.0060.00915.89
5.6.00.0100.00315.96

preferences:
36.4 ms | 401 KiB | 5 Q