3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! function get_in_sql($getdata){ if(is_array($getdata)) { $string = ""; if (count($getdata) == 1) { $string = $getdata[0]; } else { foreach ($getdata as $value) { $string .= $value.","; } } return $string; } return $getdata; } $array = array('0'=>1,'1'=>3,'2'=>2); echo get_in_sql($array);

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.0170.00016.75
8.3.50.0080.00822.05
8.3.40.0110.00418.79
8.3.30.0070.00719.04
8.3.20.0000.00720.20
8.3.10.0040.00423.57
8.3.00.0000.00821.01
8.2.180.0100.01016.50
8.2.170.0070.01022.96
8.2.160.0190.00020.53
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0100.01026.16
8.2.120.0030.00522.31
8.2.110.0040.00722.30
8.2.100.0080.00417.80
8.2.90.0000.00819.21
8.2.80.0080.00018.05
8.2.70.0060.00617.48
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0060.00318.16
8.2.30.0000.00718.05
8.2.20.0000.00717.70
8.2.10.0020.00517.68
8.2.00.0040.00417.67
8.1.280.0110.00425.92
8.1.270.0030.00523.79
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00023.79
8.1.230.0090.00319.22
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0030.00717.23
8.1.190.0000.00817.53
8.1.180.0030.00618.10
8.1.170.0120.00018.63
8.1.160.0060.00322.01
8.1.150.0000.00818.52
8.1.140.0050.00217.49
8.1.130.0000.00717.74
8.1.120.0040.00417.37
8.1.110.0000.00717.50
8.1.100.0000.00717.39
8.1.90.0000.00917.41
8.1.80.0070.00017.47
8.1.70.0070.00017.39
8.1.60.0030.00617.63
8.1.50.0070.00017.56
8.1.40.0030.00617.47
8.1.30.0030.00617.63
8.1.20.0000.00817.64
8.1.10.0040.00417.49
8.1.00.0050.00317.48
8.0.300.0030.00518.77
8.0.290.0030.00317.05
8.0.280.0070.00018.36
8.0.270.0030.00317.27
8.0.260.0030.00316.69
8.0.250.0030.00316.84
8.0.240.0040.00416.84
8.0.230.0000.00716.84
8.0.220.0030.00516.94
8.0.210.0000.00716.82
8.0.200.0030.00316.84
8.0.190.0060.00316.87
8.0.180.0000.00716.95
8.0.170.0000.00716.84
8.0.160.0030.00516.77
8.0.150.0060.00316.81
8.0.140.0080.00016.88
8.0.130.0000.00613.36
8.0.120.0080.00016.90
8.0.110.0040.00416.94
8.0.100.0040.00416.77
8.0.90.0050.00216.96
8.0.80.0090.00916.87
8.0.70.0000.00716.71
8.0.60.0070.00016.81
8.0.50.0070.00017.00
8.0.30.0130.01016.96
8.0.20.0060.01217.40
8.0.10.0050.00216.91
8.0.00.0090.01116.80
7.4.330.0000.00515.09
7.4.320.0030.00316.52
7.4.300.0030.00316.60
7.4.290.0000.00716.64
7.4.280.0060.00316.57
7.4.270.0040.00416.54
7.4.260.0030.00313.28
7.4.250.0040.00416.45
7.4.240.0030.00316.57
7.4.230.0070.00016.41
7.4.220.0090.00616.63
7.4.210.0090.00716.55
7.4.200.0000.00716.61
7.4.190.0040.00416.46
7.4.160.0130.00416.40
7.4.150.0110.00617.40
7.4.140.0080.01117.86
7.4.130.0130.00516.56
7.4.120.0100.00716.48
7.4.110.0130.00416.41
7.4.100.0110.00716.50
7.4.90.0030.01716.43
7.4.80.0090.01419.39
7.4.70.0100.00616.75
7.4.60.0050.01116.51
7.4.50.0050.00016.54
7.4.40.0040.01122.77
7.4.30.0060.01016.54
7.4.00.0040.00815.16
7.3.330.0000.00513.23
7.3.320.0070.00013.26
7.3.310.0030.00516.36
7.3.300.0030.00316.25
7.3.290.0070.01416.30
7.3.280.0060.01216.32
7.3.270.0030.01417.40
7.3.260.0190.00616.62
7.3.250.0110.00816.40
7.3.240.0080.00916.61
7.3.230.0120.00416.58
7.3.210.0080.01616.44
7.3.200.0090.00919.39
7.3.190.0120.00616.44
7.3.180.0110.01116.30
7.3.170.0080.00816.62
7.3.160.0000.01616.37
7.3.120.0100.00714.70
7.3.10.0110.00316.65
7.3.00.0080.00316.55
7.2.330.0080.01116.77
7.2.320.0100.00616.77
7.2.310.0100.00716.73
7.2.300.0120.00616.49
7.2.290.0070.01016.50
7.2.130.0070.00416.91
7.2.120.0090.00316.94
7.2.110.0030.00617.10
7.2.100.0060.00617.14
7.2.90.0030.01017.07
7.2.80.0030.00816.93
7.2.70.0090.00617.14
7.2.60.0040.00916.87
7.2.50.0040.01116.88
7.2.40.0040.00816.70
7.2.30.0040.00417.06
7.2.20.0070.00717.00
7.2.10.0080.00016.79
7.2.00.0020.01218.26
7.1.250.0100.00015.58
7.1.200.0080.00815.77
7.1.100.0000.01318.21
7.1.70.0080.00017.09
7.1.60.0070.01619.29
7.1.50.0260.01334.88
7.1.00.0030.07722.54
7.0.200.0140.00516.47
7.0.140.0100.06321.99
7.0.60.0070.08019.93
7.0.50.0030.08317.87
7.0.40.0030.04320.14
7.0.30.0270.05720.11
7.0.20.0230.06720.19
7.0.10.0030.04020.20
7.0.00.0030.04720.23
5.6.280.0070.07020.85
5.6.210.0130.07020.47
5.6.200.0030.04018.19
5.6.190.0070.04020.39
5.6.180.0270.07720.50
5.6.170.0470.06720.52
5.6.160.0030.05320.48
5.6.150.0100.07318.18
5.6.140.0070.04018.15
5.6.130.0030.09018.20
5.6.120.0100.06321.00
5.6.110.0100.07721.01
5.6.100.0200.07720.98
5.6.90.0030.05320.88
5.6.80.0130.07320.29
5.5.350.0200.07320.49
5.5.340.0100.08017.99
5.5.330.0030.05720.43
5.5.320.0300.05320.27
5.5.310.0270.05020.34
5.5.300.0030.07717.94
5.5.290.0170.03717.95
5.5.280.0130.08020.84
5.5.270.0070.04020.95
5.5.260.0100.08320.77
5.5.250.0070.05320.62
5.5.240.0170.03720.16
5.4.450.0070.07319.27
5.4.440.0100.07319.41
5.4.430.0070.07019.47
5.4.420.0070.07019.55
5.4.410.0070.07319.18
5.4.400.0030.05719.23
5.4.390.0030.05718.94
5.4.380.0000.07718.87
5.4.370.0000.08019.15
5.4.360.0070.07719.09
5.4.350.0030.08019.19
5.4.340.0030.04719.26
5.4.320.0000.05719.25
5.4.310.0030.05719.20
5.4.300.0030.08019.21
5.4.290.0000.08319.09
5.4.280.0030.07718.87
5.4.270.0100.06018.87
5.4.260.0070.06318.98
5.4.250.0100.03719.05
5.4.240.0070.05319.14
5.4.230.0030.07319.09
5.4.220.0070.04719.13
5.4.210.0030.06718.86
5.4.200.0030.08018.87
5.4.190.0000.07719.21
5.4.180.0130.05018.88
5.4.170.0000.07018.88
5.4.160.0070.06718.83
5.4.150.0070.06319.04
5.4.140.0000.07016.36
5.4.130.0070.05716.35
5.4.120.0070.07316.34
5.4.110.0070.07016.59
5.4.100.0000.06716.56
5.4.90.0070.06016.19
5.4.80.0000.07316.52
5.4.70.0100.06716.52
5.4.60.0000.07316.43
5.4.50.0000.07016.42
5.4.40.0070.06016.16
5.4.30.0030.05716.38
5.4.20.0030.05016.52
5.4.10.0070.07316.48
5.4.00.0100.05715.84
5.3.290.0070.07314.57
5.3.280.0030.07714.71
5.3.270.0100.07014.52
5.3.260.0100.07014.76
5.3.250.0000.06314.82
5.3.240.0070.05314.52
5.3.230.0000.08014.64
5.3.220.0000.08014.48
5.3.210.0000.07314.68
5.3.200.0070.06714.48
5.3.190.0070.04714.55
5.3.180.0000.07714.55
5.3.170.0000.08014.78
5.3.160.0000.07314.56
5.3.150.0030.07014.46
5.3.140.0070.06314.52
5.3.130.0070.04714.76
5.3.120.0070.06314.52
5.3.110.0070.07014.44
5.3.100.0030.07013.94
5.3.90.0000.07013.90
5.3.80.0100.04313.94
5.3.70.0000.05314.07
5.3.60.0030.03714.23
5.3.50.0000.04313.87
5.3.40.0030.06313.93
5.3.30.0000.07314.02
5.3.20.0070.05713.60
5.3.10.0070.05313.56
5.3.00.0000.07713.58
5.2.170.0000.04312.27
5.2.160.0000.05012.27
5.2.150.0030.05012.27
5.2.140.0000.06312.27
5.2.130.0030.06712.27
5.2.120.0000.04712.27
5.2.110.0100.05312.27
5.2.100.0000.05012.27
5.2.90.0070.03712.27
5.2.80.0030.06012.27
5.2.70.0030.05012.27
5.2.60.0030.04012.27
5.2.50.0070.04012.27
5.2.40.0030.03312.27
5.2.30.0070.04712.27
5.2.20.0070.04312.27
5.2.10.0000.06012.27
5.2.00.0100.05012.27
5.1.60.0000.04712.27
5.1.50.0000.03712.27
5.1.40.0000.04712.27
5.1.30.0070.04012.27
5.1.20.0030.04712.27
5.1.10.0030.05712.27
5.1.00.0000.04712.27
5.0.50.0070.03312.27
5.0.40.0030.04012.27
5.0.30.0030.06012.27
5.0.20.0070.04012.27
5.0.10.0030.03312.27
5.0.00.0000.06012.27
4.4.90.0100.02712.27
4.4.80.0070.02012.27
4.4.70.0030.02712.27
4.4.60.0030.03312.27
4.4.50.0000.03312.27
4.4.40.0000.05312.27
4.4.30.0000.02012.27
4.4.20.0000.04012.27
4.4.10.0030.03712.27
4.4.00.0000.04312.27
4.3.110.0000.03012.27
4.3.100.0000.03312.27
4.3.90.0000.03712.27
4.3.80.0100.04012.27
4.3.70.0000.02312.27
4.3.60.0000.03712.27
4.3.50.0000.03712.27
4.3.40.0000.04712.27
4.3.30.0000.03712.27
4.3.20.0070.03012.27
4.3.10.0000.03312.27
4.3.00.0130.02312.27

preferences:
48.87 ms | 400 KiB | 5 Q