3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mediaArray ='Facebook,Twitter,Twitch,'; $otherMedia = 'House'; //convert string to array $socialArray = explode(',', $mediaArray); //declare some variables to be used later $andwhere = ''; $bp = ''; $socialmarray = ''; //get every value from array of social media foreach($socialArray as $socialmedia){ $socialmarray .=$socialmedia.','; $andwhere .= " AND socialmedianame=?"; $bp .='s'; } //test strings $wheres = $andwhere;//AND socialmedianame=? AND socialmedianame=? AND socialmedianame=? $bip = $bp.'s';//ssss $validarayy = rtrim($socialmarray,','); //Facebook,Twitter,Twitch $socialmarray2 = explode(',', $validarayy); var_dump($socialmarray2);

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)
8.4.20.0100.01020.66
8.4.10.0130.00317.64
8.3.140.0040.01518.99
8.3.130.0000.00818.16
8.3.120.0150.00420.53
8.3.110.0000.01616.75
8.3.100.0070.00316.75
8.3.90.0090.00926.77
8.3.80.0090.00017.97
8.3.70.0040.01118.60
8.3.60.0160.00618.39
8.3.50.0090.01018.15
8.3.40.0110.00418.67
8.3.30.0070.00718.67
8.3.20.0040.00418.62
8.3.10.0080.00021.76
8.3.00.0080.00021.90
8.2.260.0070.00016.64
8.2.250.0080.00018.38
8.2.240.0090.00017.25
8.2.230.0090.00020.94
8.2.220.0060.00337.54
8.2.210.0140.00426.77
8.2.200.0100.00016.75
8.2.190.0070.00718.14
8.2.180.0110.00718.29
8.2.170.0100.01022.96
8.2.160.0070.00719.08
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00022.08
8.2.120.0030.00526.35
8.2.110.0110.00720.58
8.2.100.0080.00417.72
8.2.90.0000.00818.34
8.2.80.0000.00917.97
8.2.70.0080.00018.02
8.2.60.0000.00818.09
8.2.50.0090.00018.10
8.2.40.0040.00421.18
8.2.30.0040.00420.59
8.2.20.0000.00718.13
8.2.10.0080.00018.04
8.2.00.0000.00719.50
8.1.310.0040.01416.23
8.1.300.0100.00718.50
8.1.290.0030.00630.84
8.1.280.0040.01125.92
8.1.270.0040.00420.33
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0030.00623.89
8.1.230.0080.00421.89
8.1.220.0040.00417.77
8.1.210.0040.00418.85
8.1.200.0030.00617.35
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0050.00518.66
8.1.160.0050.00218.82
8.1.150.0040.00418.91
8.1.140.0000.00718.80
8.1.130.0030.00517.46
8.1.120.0050.00517.44
8.1.110.0030.00517.48
8.1.100.0000.00717.37
8.1.90.0000.00817.40
8.1.80.0040.00417.53
8.1.70.0040.00417.45
8.1.60.0030.00617.61
8.1.50.0040.00417.56
8.1.40.0000.00717.55
8.1.30.0000.00817.56
8.1.20.0000.00817.63
8.1.10.0040.00417.46
8.1.00.0040.00417.44
8.0.300.0060.00320.03
8.0.290.0040.00416.61
8.0.280.0000.00918.37
8.0.270.0040.00416.82
8.0.260.0000.00716.87
8.0.250.0030.00516.91
8.0.240.0030.00516.84
8.0.230.0070.00016.98
8.0.220.0030.00616.85
8.0.210.0060.00316.91
8.0.200.0000.00716.90
8.0.190.0070.00017.01
8.0.180.0050.00517.01
8.0.170.0030.00516.81
8.0.160.0030.00516.95
8.0.150.0000.00716.81
8.0.140.0000.00816.88
8.0.130.0000.00613.33
8.0.120.0000.00716.85
8.0.110.0000.00916.78
8.0.100.0000.00716.78
8.0.90.0000.00716.81
8.0.80.0090.00616.86
8.0.70.0040.00416.89
8.0.60.0040.00416.70
8.0.50.0040.00416.70
8.0.30.0070.01217.02
8.0.20.0110.01117.40
8.0.10.0070.00016.90
8.0.00.0090.00916.81
7.4.330.0000.00515.55
7.4.320.0000.00616.38
7.4.300.0060.00016.61
7.4.290.0030.00716.56
7.4.280.0030.00716.59
7.4.270.0000.00816.52
7.4.260.0000.00716.61
7.4.250.0070.00016.55
7.4.240.0040.00416.49
7.4.230.0030.00316.33
7.4.220.0040.00516.69
7.4.210.0090.00616.57
7.4.200.0070.00016.58
7.4.160.0110.00616.43
7.4.140.0090.00917.86
7.4.130.0040.01316.49
7.4.120.0090.00916.54
7.4.110.0130.00416.50
7.4.100.0070.01016.58
7.4.90.0040.01316.49
7.4.80.0130.00519.39
7.4.70.0100.00716.56
7.4.60.0030.01416.44
7.4.50.0000.01316.37
7.4.40.0150.00316.52
7.4.00.0100.00714.98
7.3.330.0050.00013.14
7.3.320.0030.00313.08
7.3.310.0040.00216.27
7.3.300.0070.00016.25
7.3.290.0030.00316.38
7.3.280.0030.01216.28
7.3.260.0080.01016.40
7.3.240.0090.01116.45
7.3.230.0150.00316.45
7.3.210.0070.01016.46
7.3.200.0110.00616.61
7.3.190.0060.01216.39
7.3.180.0140.00316.36
7.3.170.0090.01216.38
7.3.160.0060.00916.40
7.3.120.0060.01214.87
7.3.110.0030.01714.87
7.3.100.0030.01014.63
7.3.90.0070.01114.63
7.3.80.0030.01214.64
7.3.70.0060.00614.82
7.3.60.0040.01114.62
7.3.50.0040.00814.70
7.3.40.0110.00714.96
7.3.30.0060.00314.82
7.3.20.0070.00716.87
7.3.10.0040.01216.72
7.3.00.0030.01016.63
7.2.330.0090.00916.51
7.2.320.0050.01416.78
7.2.310.0060.01216.49
7.2.300.0120.00316.77
7.2.290.0120.00416.59
7.2.250.0070.01115.17
7.2.240.0060.00615.16
7.2.230.0030.00914.95
7.2.220.0120.00315.23
7.2.210.0060.00914.97
7.2.200.0060.00915.09
7.2.190.0080.00414.96
7.2.180.0030.01314.79
7.2.170.0100.00314.93
7.2.100.3180.00314.82
7.2.90.3800.00314.34
7.2.80.3530.00314.64
7.2.70.3040.00614.58
7.2.60.3430.00714.98
7.2.50.3410.01014.91
7.2.40.3200.00314.77
7.2.30.3720.00014.26
7.2.20.3380.01315.11
7.2.10.2780.01015.07
7.2.00.2940.00715.00
7.1.330.0070.00715.65
7.1.320.0030.01015.75
7.1.310.0040.00715.52
7.1.300.0040.01115.81
7.1.290.0070.00715.42
7.1.280.0040.01415.82
7.1.270.0060.00615.59
7.1.260.0030.01315.88
7.1.210.3290.00713.83
7.1.200.3870.01013.93
7.1.190.3080.00313.63
7.1.180.3300.00013.78
7.1.170.3160.00613.89
7.1.160.3030.00613.42
7.1.150.3080.00713.51
7.1.140.3570.00713.91
7.1.130.3280.01613.68
7.1.120.2480.01013.77
7.1.110.2420.00013.70
7.1.100.2210.00013.74
7.1.90.3510.00913.84
7.1.80.3580.00313.89
7.1.70.3740.00713.81
7.1.60.3890.01032.04
7.1.50.3690.01731.78
7.1.40.4400.01631.79
7.1.30.6970.00331.91
7.1.20.3280.01331.54
7.1.10.3230.00313.61
7.1.00.1650.00713.86

preferences:
35.3 ms | 403 KiB | 5 Q