3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"language":"en","education":[{"unit":"e1","language":"en"}],"membership":[{"uei":"21","Uifed":"failed"}]}'; $arrayData = json_decode($json, true); $replacementData = array('membership' => array(array('Uifed' => 'success'))); $newArrayData = array_replace_recursive($arrayData, $replacementData); print_r($newArrayData); $replacementData = array('Uifed' => 'success'); array_walk_recursive($arrayData, function (&$value, $key) use ($replacementData) { $value = $replacementData[$key] ?? $value; }); print_r($arrayData);

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.0160.00322.38
8.4.10.0060.00322.46
8.3.150.0060.01318.67
8.3.140.0070.00316.25
8.3.130.0120.00618.30
8.3.120.0100.01020.71
8.3.110.0000.00816.64
8.3.100.0080.00018.24
8.3.90.0000.00926.77
8.3.80.0060.00319.36
8.3.70.0140.00016.59
8.3.60.0150.00018.39
8.3.50.0130.00324.55
8.3.40.0040.01118.84
8.3.30.0110.00418.58
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0150.00026.16
8.2.270.0110.00717.00
8.2.260.0060.00316.31
8.2.250.0030.00616.59
8.2.240.0040.00416.72
8.2.230.0030.00620.94
8.2.220.0130.00724.06
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0090.00918.41
8.2.180.0130.00925.92
8.2.170.0090.00618.79
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0040.00419.51
8.2.110.0060.00321.94
8.2.100.0080.00817.84
8.2.90.0050.00319.05
8.2.80.0040.00418.03
8.2.70.0030.00617.75
8.2.60.0030.00618.03
8.2.50.0000.00818.07
8.2.40.0000.00820.01
8.2.30.0040.00718.20
8.2.20.0050.00218.18
8.2.10.0070.00019.23
8.2.00.0040.00419.32
8.1.310.0040.00416.93
8.1.300.0040.00418.02
8.1.290.0060.00330.84
8.1.280.0070.01425.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.74
8.1.230.0100.00317.81
8.1.220.0100.00017.89
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0090.00018.10
8.1.170.0050.00318.53
8.1.160.0000.00718.90
8.1.150.0000.00818.97
8.1.140.0000.00818.92
8.1.130.0070.00017.50
8.1.120.0040.00417.52
8.1.110.0080.00017.36
8.1.100.0030.00617.46
8.1.90.0030.00317.48
8.1.80.0110.00017.36
8.1.70.0030.00317.44
8.1.60.0040.00417.60
8.1.50.0030.00617.54
8.1.40.0030.00617.54
8.1.30.0030.00517.68
8.1.20.0040.00417.67
8.1.10.0000.00817.49
8.1.00.0060.00617.40
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0040.00418.45
8.0.270.0030.00317.88
8.0.260.0030.00316.82
8.0.250.0000.00716.91
8.0.240.0000.00616.98
8.0.230.0000.00716.96
8.0.220.0080.00016.76
8.0.210.0000.00716.80
8.0.200.0000.00716.96
8.0.190.0040.00416.84
8.0.180.0000.00716.90
8.0.170.0060.00316.90
8.0.160.0050.00316.91
8.0.150.0040.00416.89
8.0.140.0000.00716.84
8.0.130.0050.00013.39
8.0.120.0040.00416.77
8.0.110.0070.00016.84
8.0.100.0070.00016.78
8.0.90.0080.00016.89
8.0.80.0100.00716.88
8.0.70.0000.00716.89
8.0.60.0050.00316.77
8.0.50.0000.00816.71
8.0.30.0060.01117.15
8.0.20.0060.01516.89
8.0.10.0000.00717.08
8.0.00.0040.01916.73
7.4.330.0020.00215.55
7.4.320.0020.00516.41
7.4.300.0060.00016.50
7.4.290.0040.00416.59
7.4.280.0060.00316.64
7.4.270.0030.00316.50
7.4.260.0000.00613.27
7.4.250.0000.00716.52
7.4.240.0050.00216.63
7.4.230.0030.00316.49
7.4.220.0020.00516.52
7.4.210.0080.00616.44
7.4.200.0070.00016.63
7.4.130.0120.01016.68
7.4.120.0160.00416.70
7.4.110.0130.01016.55
7.4.100.0070.01416.54
7.4.90.0210.00316.55
7.4.80.0100.01016.45
7.4.70.0120.01216.33
7.4.60.0070.01016.58
7.4.50.0090.00916.57
7.4.40.0170.00816.40
7.4.30.0110.00716.54
7.4.20.0090.00916.40
7.4.10.0080.01116.59
7.4.00.0130.01016.57
7.3.330.0000.00716.30
7.3.320.0030.00313.18
7.3.310.0000.00716.23
7.3.300.0060.00016.37
7.3.290.0080.00716.31
7.3.260.0090.00916.47
7.3.230.0130.00716.40
7.3.210.0090.01516.52
7.3.200.0100.01316.53
7.3.190.0090.01316.68
7.3.180.0150.00916.41
7.3.170.0190.00316.44
7.3.160.0080.01116.48
7.3.150.0090.00916.38
7.3.140.0120.01216.44
7.3.130.0120.01216.40
7.3.120.0060.01616.42
7.3.110.0200.00016.53
7.3.100.0090.01316.43
7.3.90.0120.01216.45
7.3.80.0090.01416.33
7.3.70.0070.01016.56
7.3.60.0120.00916.42
7.3.50.0120.01216.27
7.3.40.0100.00716.48
7.3.30.0030.01316.29
7.3.20.0150.00916.45
7.3.10.0090.00916.19
7.3.00.0110.00816.43
7.2.330.0090.01316.62
7.2.320.0070.01516.55
7.2.310.0080.01116.52
7.2.300.0040.01516.53
7.2.290.0120.01216.60
7.2.280.0130.01816.55
7.2.270.0180.00016.58
7.2.260.0090.00916.70
7.2.250.0160.00716.54
7.2.240.0110.01116.50
7.2.230.0100.01316.52
7.2.220.0120.01216.59
7.2.210.0070.01716.40
7.2.200.0130.00916.73
7.2.190.0140.01116.60
7.2.180.0060.01216.56
7.2.170.0140.00416.64
7.2.160.0100.01416.63
7.2.150.0120.00916.71
7.2.140.0120.00816.58
7.2.130.0100.01316.47
7.2.120.0130.01116.68
7.2.110.0060.01316.54
7.2.100.0160.00916.69
7.2.90.0100.01316.62
7.2.80.0060.01216.39
7.2.70.0210.00316.69
7.2.60.0110.00816.82
7.2.50.0140.00616.54
7.2.40.0130.00716.81
7.2.30.0130.01016.59
7.2.20.0160.00716.87
7.2.10.0060.01816.49
7.2.00.0140.00616.67

preferences:
29.16 ms | 403 KiB | 5 Q