3v4l.org

run code in 300+ PHP versions simultaneously
<?php # # Note that in this example, you can achieve the same result by imploding the terms # but I left it as is to resemble your code. # function cameramodel($delimiter) { # Example terms... $terms = ["one", "two", "three"]; # Create an array to store the results. $result = []; # Iterate over every term. foreach ($terms as $term) { # Insert the term into the result array. $result[] = $term; } # Return the elements of the array glued together as a string. return implode($delimiter, $result); } # Call the function using a demiliter of your choice. $cameramodel = cameramodel(" and\n"); ?> <?php echo $cameramodel; ?>

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.120.0110.00922.52
8.4.110.0100.00918.62
8.4.100.0120.00617.52
8.4.90.0130.00818.78
8.4.80.0050.00317.91
8.4.70.0080.00817.89
8.4.60.0130.00918.69
8.4.50.0080.01218.73
8.4.40.0030.00617.84
8.4.30.0130.00617.53
8.4.20.0130.00719.64
8.4.10.0130.00717.45
8.3.250.0130.00618.77
8.3.240.0100.00816.54
8.3.230.0150.00416.69
8.3.220.0130.00517.13
8.3.210.0130.00518.36
8.3.200.0050.00316.76
8.3.190.0040.00416.99
8.3.180.0140.00416.57
8.3.170.0070.01017.12
8.3.160.0110.00718.62
8.3.150.0090.00920.85
8.3.140.0110.00717.18
8.3.130.0080.00016.79
8.3.120.0150.00320.91
8.3.110.0040.00420.94
8.3.100.0070.00316.74
8.3.90.0030.01226.77
8.3.80.0060.00316.66
8.3.70.0150.00418.43
8.3.60.0200.00018.30
8.3.50.0040.00818.19
8.3.40.0100.00618.89
8.3.30.0110.00318.52
8.3.20.0040.00418.98
8.3.10.0090.00023.48
8.3.00.0080.00023.71
8.2.290.0080.01220.54
8.2.280.0060.00318.37
8.2.270.0000.01416.88
8.2.260.0060.00316.72
8.2.250.0080.00016.54
8.2.240.0000.00818.92
8.2.230.0080.00022.58
8.2.220.0000.01024.06
8.2.210.0120.00626.77
8.2.200.0060.00616.63
8.2.190.0110.01116.75
8.2.180.0160.00725.92
8.2.170.0170.00318.91
8.2.160.0070.00722.96
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0040.00422.14
8.2.120.0040.00426.35
8.2.110.0100.00022.30
8.2.100.0000.01217.84
8.2.90.0000.00818.03
8.2.80.0060.00617.97
8.2.70.0000.00817.80
8.2.60.0040.00417.80
8.2.50.0030.00518.10
8.2.40.0080.00019.30
8.2.30.0100.00021.16
8.2.20.0000.00718.16
8.2.10.0040.00418.08
8.2.00.0070.00019.62
8.1.330.0090.01021.68
8.1.320.0060.01316.17
8.1.310.0000.00818.02
8.1.300.0160.00316.18
8.1.290.0060.00330.84
8.1.280.0080.00825.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0060.00320.98
8.1.230.0110.00020.88
8.1.220.0000.00917.79
8.1.210.0000.00818.90
8.1.200.0080.00017.35
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0000.01018.89
8.1.160.0000.00718.88
8.1.150.0040.00418.87
8.1.140.0030.00518.92
8.1.130.0080.00019.01
8.1.120.0040.00417.34
8.1.110.0000.00717.36
8.1.100.0000.00917.35
8.1.90.0030.00517.41
8.1.80.0070.00017.37
8.1.70.0000.00717.34
8.1.60.0000.00817.58
8.1.50.0000.00917.43
8.1.40.0040.00417.48
8.1.30.0000.00817.60
8.1.20.0050.00217.71
8.1.10.0030.00517.41
8.1.00.0030.00617.43
8.0.300.0040.00419.89
8.0.290.0070.00016.63
8.0.280.0070.00018.45
8.0.270.0070.00017.25
8.0.260.0070.00017.27
8.0.250.0000.00616.84
8.0.240.0060.00016.96
8.0.230.0070.00016.96
8.0.220.0030.00616.91
8.0.210.0040.00416.93
8.0.200.0060.00016.84
8.0.190.0030.00617.00
8.0.180.0100.00316.88
8.0.170.0030.00516.82
8.0.160.0040.00416.80
8.0.150.0070.00016.71
8.0.140.0000.00816.89
8.0.130.0000.00713.27
8.0.120.0050.00316.87
8.0.110.0000.00916.95
8.0.100.0070.00016.78
8.0.90.0000.00716.96
8.0.80.0050.01016.89
8.0.70.0050.00316.68
8.0.60.0040.00416.85
8.0.50.0040.00416.92
8.0.30.0110.00717.23
8.0.20.0150.00817.40
8.0.10.0040.00416.96
8.0.00.0100.00816.78
7.4.330.0020.00215.55
7.4.320.0000.00716.59
7.4.300.0080.00016.64
7.4.290.0020.00516.68
7.4.280.0050.00516.60
7.4.270.0070.00016.56
7.4.260.0000.00716.50
7.4.250.0000.00816.46
7.4.240.0030.00316.50
7.4.230.0000.00716.67
7.4.220.0030.00516.50
7.4.210.0030.01016.60
7.4.200.0000.00716.68
7.4.160.0140.00716.43
7.4.140.0100.00817.86
7.4.130.0150.00316.63
7.4.120.0100.01116.52
7.4.110.0130.00316.57
7.4.100.0030.01316.39
7.4.90.0060.01216.43
7.4.80.0120.00919.39
7.4.70.0080.00816.56
7.4.60.0090.00916.55
7.4.50.0080.00516.36
7.4.40.0160.00316.52
7.4.00.0000.01415.04
7.3.330.0000.00613.29
7.3.320.0060.00013.24
7.3.310.0060.00016.33
7.3.300.0000.00716.29
7.3.290.0000.00616.31
7.3.280.0060.00916.29
7.3.260.0100.01016.37
7.3.240.0070.01116.43
7.3.230.0070.01016.51
7.3.210.0100.00716.30
7.3.200.0060.01016.35
7.3.190.0030.01416.50
7.3.180.0090.00916.39
7.3.170.0130.00316.38
7.3.160.0120.00616.53
7.2.330.0140.00816.63
7.2.320.0100.01016.50
7.2.310.0090.01616.69
7.2.300.0100.01016.78
7.2.290.0120.00616.57
7.2.80.0330.00914.75
7.2.70.0520.00415.04
7.2.60.0320.01115.05
7.2.50.0430.00714.91
7.2.40.0470.00715.19
7.2.30.0330.01115.15
7.2.20.0420.00314.96
7.2.10.0610.01414.91
7.2.00.0360.00714.71
7.1.200.0030.00915.82
7.1.190.0330.01013.78
7.1.180.0470.01014.05
7.1.170.0470.00614.02
7.1.160.0370.00314.06
7.1.150.0580.00714.06
7.1.140.0460.01013.66
7.1.130.0380.00614.00
7.1.120.0300.01114.07
7.1.110.0330.01013.93
7.1.100.0360.00614.00
7.1.90.1190.01313.98
7.1.80.0450.00313.95
7.1.70.0310.01013.78
7.1.60.0520.01231.89
7.1.50.0640.01031.76
7.1.40.0640.00631.75
7.1.30.0630.01631.54
7.1.20.0750.01031.69
7.1.10.0410.01213.72
7.1.00.0410.01013.84

preferences:
45.12 ms | 403 KiB | 5 Q