3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{"products":[{"product_id":"057-10-1351","desired_quantity":1}],"nearby":"32765","radius":100,"multichannel_options":[{"multichannel_option":"none"}]}'; $id = 1; $zip = 2; $prox = 3; $x = (object)[ "products" => [ "product_id" => $id , "desired_quantity" => 1 ] , "nearby" => $zip , "radius" => $prox ]; var_dump($x); print json_encode($x)

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)
5.4.320.3030.04018.88
5.4.310.3270.04018.81
5.4.300.3130.04018.88
5.4.290.2970.03318.92
5.4.280.2930.04019.13
5.4.270.3200.04019.13
5.4.260.2730.03718.80
5.4.250.3500.04718.89
5.4.240.3130.04019.13
5.4.230.3530.03319.07
5.4.220.3370.04319.11
5.4.210.3270.03719.15
5.4.200.3600.03019.09
5.4.190.3330.03719.07
5.4.180.3430.04019.07
5.4.170.3130.03018.87
5.4.160.3330.03719.22
5.4.150.3170.03319.13
5.4.140.3470.03716.34
5.4.130.3900.03716.41
5.4.120.4100.03316.54
5.4.110.3800.03316.39
5.4.100.3830.03316.48
5.4.90.3830.03316.09
5.4.80.3430.03716.38
5.4.70.3430.02716.21
5.4.60.3400.03716.04
5.4.50.3230.03716.04
5.4.40.3470.04016.20
5.4.30.3170.03316.43
5.4.20.3270.02716.43
5.4.10.3430.03716.20
5.4.00.3400.04015.71
5.3.290.3030.03314.57
5.3.280.3430.03714.40
5.3.270.3570.03314.66
5.3.260.3100.04014.59
5.3.250.3070.04014.46
5.3.240.3070.03314.45
5.3.230.3970.03714.45
5.3.220.4030.04014.41
5.3.210.4170.03314.41
5.3.200.4070.03714.41
5.3.190.3570.03314.55
5.3.180.2670.03714.43
5.3.170.3500.03014.42
5.3.160.3430.03314.59
5.3.150.3300.04014.44
5.3.140.3370.03714.40
5.3.130.3530.03314.51
5.3.120.3170.04314.53
5.3.110.3270.04314.42
5.3.100.3400.04013.91
5.3.90.3470.03313.97
5.3.80.3170.03713.96
5.3.70.3570.03013.87
5.3.60.2830.03313.95
5.3.50.3370.04013.78
5.3.40.2870.03313.79
5.3.30.3400.03713.75
5.3.20.3600.03313.52
5.3.10.3370.04313.56
5.3.00.3430.04013.41
5.2.170.2800.02711.19
5.2.160.3200.03711.00
5.2.150.2630.03011.08
5.2.140.2970.02711.10
5.2.130.2670.03310.96
5.2.120.3000.02311.04
5.2.110.2700.02710.94
5.2.100.2900.02710.94
5.2.90.2930.03310.95
5.2.80.2730.03011.10
5.2.70.2830.02711.25
5.2.60.2470.03710.98
5.2.50.2770.03311.06
5.2.40.2330.02711.14
5.2.30.2500.02710.83
5.2.20.2370.02710.80
5.2.10.2200.02010.83
5.2.00.2130.03310.61
5.1.60.2200.02010.08
5.1.50.2330.02710.01
5.1.40.2500.0279.89
5.1.30.2130.02010.49
5.1.20.2400.02710.38
5.1.10.2300.0239.98
5.1.00.2270.02310.05
5.0.50.1070.0208.54
5.0.40.1300.0238.28
5.0.30.1030.0338.27
5.0.20.1070.0208.27
5.0.10.1300.0278.29
5.0.00.1270.0308.27
4.4.90.1230.0178.24
4.4.80.1230.0178.24
4.4.70.1100.0138.24
4.4.60.1270.0208.24
4.4.50.1270.0208.24
4.4.40.1270.0338.24
4.4.30.1400.0178.24
4.4.20.1100.0108.24
4.4.10.1330.0178.24
4.4.00.1400.0208.27
4.3.110.1370.0178.27
4.3.100.1300.0178.27
4.3.90.1230.0178.27
4.3.80.1330.0208.27
4.3.70.1070.0178.27
4.3.60.1330.0178.27
4.3.50.1270.0138.27
4.3.40.1300.0308.27
4.3.30.0700.0278.27
4.3.20.0630.0238.27
4.3.10.0730.0178.27
4.3.00.0700.0238.27

preferences:
136.76 ms | 1394 KiB | 7 Q