3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "destination=Apartment+TITLIS+Resort+Wohnung+721&hotelid=0123454656"; if (($pos = strpos($data, "=")) !== FALSE) { $whatIWant = ucwords(substr($data, $pos+1)); $whatIWant = explode("&", $whatIWant); $whatIWant = $whatIWant[0]; echo "Ans1: \n"; echo $whatIWant; // Output: Apartment+TITLIS+Resort+Wohnung+721 // if you want your output with & just add & echo "\n\nAns2: \n"; $whatIWant = $whatIWant."&"; echo $whatIWant; // now Output iss: // Apartment+TITLIS+Resort+Wohnung+721& } ?>

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.3.60.0110.00416.75
8.3.50.0070.01017.97
8.3.40.0120.00318.58
8.3.30.0090.00618.44
8.3.20.0070.00020.34
8.3.10.0070.00021.78
8.3.00.0000.00823.66
8.2.180.0140.00418.41
8.2.170.0140.00022.96
8.2.160.0070.00720.35
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00022.31
8.2.120.0110.00426.35
8.2.110.0040.00421.11
8.2.100.0080.00317.86
8.2.90.0030.00617.84
8.2.80.0040.00417.97
8.2.70.0000.00818.05
8.2.60.0050.00318.05
8.2.50.0040.00418.28
8.2.40.0050.00320.54
8.2.30.0040.00419.22
8.2.20.0000.00818.00
8.2.10.0040.00418.12
8.2.00.0000.00817.99
8.1.280.0110.00725.92
8.1.270.0000.00920.40
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.87
8.1.230.0060.00620.85
8.1.220.0000.00917.77
8.1.210.0000.01118.77
8.1.200.0100.00017.35
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0080.00018.38
8.1.160.0030.00318.85
8.1.150.0000.00819.94
8.1.140.0070.00017.29
8.1.130.0040.00418.96
8.1.120.0000.00717.39
8.1.110.0000.00817.33
8.1.100.0040.00417.38
8.1.90.0000.00717.28
8.1.80.0070.00017.42
8.1.70.0030.00317.29
8.1.60.0040.00417.38
8.1.50.0030.00617.34
8.1.40.0080.00017.47
8.1.30.0040.00417.63
8.1.20.0080.00017.55
8.1.10.0040.00417.52
8.1.00.0080.00017.47
8.0.300.0080.00019.65
8.0.290.0000.00716.75
8.0.280.0030.00318.57
8.0.270.0000.00717.23
8.0.260.0000.00718.39
8.0.250.0030.00416.96
8.0.240.0060.00316.83
8.0.230.0030.00316.84
8.0.220.0000.00616.86
8.0.210.0020.00516.84
8.0.200.0050.00316.95
8.0.190.0000.00816.89
8.0.180.0040.00416.84
8.0.170.0030.00316.74
8.0.160.0040.00416.95
8.0.150.0000.00716.72
8.0.140.0040.00416.87
8.0.130.0000.00613.39
8.0.120.0040.00416.81
8.0.110.0050.00216.91
8.0.100.0040.00416.86
8.0.90.0040.00416.79
8.0.80.0120.00316.80
8.0.70.0040.00416.93
8.0.60.0000.00716.77
8.0.50.0040.00416.72
8.0.30.0120.00717.16
8.0.20.0130.00617.40
8.0.10.0030.00516.81
8.0.00.0100.00716.56
7.4.330.0040.00015.55
7.4.320.0030.00316.64
7.4.300.0050.00216.50
7.4.290.0000.00616.64
7.4.280.0000.00816.50
7.4.270.0060.00016.52
7.4.260.0070.00016.59
7.4.250.0070.00016.41
7.4.240.0070.00016.65
7.4.230.0000.00716.43
7.4.220.0180.00616.53
7.4.210.0060.00816.58
7.4.200.0000.00716.62
7.4.160.0030.01216.48
7.4.150.0100.00717.40
7.4.140.0110.00917.86
7.4.130.0070.01016.55
7.4.120.0070.01316.53
7.4.110.0060.01216.57
7.4.100.0060.01016.61
7.4.90.0070.01016.46
7.4.80.0100.00719.39
7.4.70.0150.00516.54
7.4.60.0060.00916.45
7.4.50.0030.01016.48
7.4.40.0110.00716.47
7.4.30.0000.01516.29
7.4.00.0030.01015.00
7.3.330.0040.00413.20
7.3.320.0050.00013.08
7.3.310.0040.00416.43
7.3.300.0030.00316.36
7.3.290.0080.00616.29
7.3.280.0080.00816.26
7.3.270.0040.01417.40
7.3.260.0120.01216.41
7.3.250.0080.01016.49
7.3.240.0100.00816.53
7.3.230.0130.00316.36
7.3.210.0060.01316.60
7.3.200.0160.00316.48
7.3.190.0030.01316.39
7.3.180.0070.00716.61
7.3.170.0090.00616.54
7.3.160.0060.00916.33
7.3.00.0030.00916.24
7.2.330.0120.00916.64
7.2.320.0070.01016.70
7.2.310.0090.01016.72
7.2.300.0090.00616.70
7.2.290.0080.00816.53
7.2.130.0030.01016.82
7.2.120.0040.00716.53
7.2.110.0080.00317.16
7.2.100.0060.00916.68
7.2.90.0040.00816.86
7.2.80.0060.00616.82
7.2.70.0060.00616.76
7.2.60.0100.00516.71
7.2.50.0060.00616.91
7.2.40.0030.00916.67
7.2.30.0060.00316.63
7.2.20.0030.00916.89
7.2.10.0080.00616.79
7.2.00.0030.00916.85
7.1.250.0040.00815.83
7.1.240.0100.00315.80
7.1.230.0030.01015.61
7.1.220.0060.00615.75
7.1.210.0070.00715.75
7.1.200.0040.00915.72
7.1.190.0030.01215.87
7.1.180.0000.01115.71
7.1.170.0070.00315.79
7.1.160.0030.01015.50
7.1.150.0060.00615.99
7.1.140.0040.00815.70
7.1.130.0040.00815.86
7.1.120.0070.00315.96
7.1.110.0000.01715.48
7.1.100.3700.00716.01
7.1.90.3990.00815.93
7.1.80.2330.01215.74
7.1.70.2800.01015.53
7.1.60.2950.00824.46
7.1.50.2270.01024.31
7.1.40.0150.01024.35
7.1.30.0160.01024.31
7.1.20.2010.01424.04
7.1.10.1680.01115.31
7.1.00.1730.00615.21
7.0.330.0000.01215.34
7.0.320.0060.00615.31
7.0.310.0030.01015.02
7.0.300.0090.00015.11
7.0.290.0080.00015.29
7.0.280.0040.00815.23
7.0.270.0080.00315.41
7.0.260.0000.01615.09
7.0.250.0080.00015.14
7.0.240.3200.00915.61
7.0.230.3560.00515.44
7.0.220.3120.01115.51
7.0.210.2730.00714.89
7.0.200.3140.00515.18
7.0.190.3920.01015.19
7.0.180.0150.00414.99
7.0.170.0120.00814.85
7.0.160.3410.01114.75
7.0.150.1930.00714.87
7.0.140.2380.01415.00
7.0.130.1890.01014.96
7.0.120.1680.00714.94
7.0.110.1610.01314.95
7.0.100.1510.00714.91
7.0.90.1960.00514.84
7.0.80.2140.01015.01
7.0.70.1570.01214.60
7.0.60.1550.00514.90
7.0.50.2460.01214.87
7.0.40.1600.01414.02
7.0.30.1610.01214.21
7.0.20.1570.01014.01
7.0.10.1870.01013.91
7.0.00.1820.00914.01
5.6.380.0030.00813.96

preferences:
62.93 ms | 400 KiB | 5 Q