3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _object_to_array_batch($object) { return $object; } function set_insert_batch($key) { $key = _object_to_array_batch($key); var_dump(current($key)); } function insert_batch($object) { set_insert_batch($object); } function test_walk() { $foo = [ ['a' => 'hao', 'language' =>'US'], ['a' => 'buhao', 'language' =>'CN'], ]; array_walk($foo, function(&$item, $key, $parent_id) {$item['parent_id'] = $parent_id;}, 123); var_dump(current($foo)); insert_batch($foo); } test_walk();

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.130.0040.00418.32
8.3.120.0000.00820.66
8.3.110.0060.00320.94
8.3.100.0060.00318.21
8.3.90.0040.00418.52
8.3.80.0090.00017.97
8.3.70.0070.00716.38
8.3.60.0120.00316.50
8.3.50.0120.00821.21
8.3.40.0040.01118.76
8.3.30.0140.00018.79
8.3.20.0040.00420.21
8.3.10.0030.00620.39
8.3.00.0040.00423.48
8.2.250.0110.00316.61
8.2.240.0080.00019.05
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0060.00316.75
8.2.190.0040.01116.58
8.2.180.0070.00718.31
8.2.170.0060.01022.96
8.2.160.0000.01419.41
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0110.00420.87
8.2.110.0070.00321.03
8.2.100.0080.00417.84
8.2.90.0030.00619.16
8.2.80.0060.00317.97
8.2.70.0050.00317.38
8.2.60.0000.00818.16
8.2.50.0000.00818.28
8.2.40.0040.00422.32
8.2.30.0030.00619.32
8.2.20.0070.00018.25
8.2.10.0000.00718.01
8.2.00.0040.00417.77
8.1.300.0060.00318.45
8.1.290.0060.00318.88
8.1.280.0040.01525.92
8.1.270.0050.00322.19
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0140.00722.87
8.1.230.0030.00917.71
8.1.220.0060.00317.91
8.1.210.0040.00418.77
8.1.200.0060.00317.21
8.1.190.0080.00017.35
8.1.180.0000.00918.10
8.1.170.0000.00818.68
8.1.160.0030.00322.07
8.1.150.0000.00718.83
8.1.140.0040.00419.46
8.1.130.0050.00217.38
8.1.120.0000.00917.52
8.1.110.0040.00417.49
8.1.100.0050.00317.38
8.1.90.0070.00017.48
8.1.80.0080.00017.47
8.1.70.0050.00217.48
8.1.60.0020.00517.63
8.1.50.0060.00317.55
8.1.40.0040.00417.43
8.1.30.0060.00317.59
8.1.20.0040.00417.59
8.1.10.0030.00617.50
8.1.00.0050.00317.52
8.0.300.0050.00518.77
8.0.290.0090.00016.75
8.0.280.0070.00018.41
8.0.270.0030.00317.12
8.0.260.0030.00316.64
8.0.250.0000.00716.89
8.0.240.0000.00816.91
8.0.230.0000.00716.79
8.0.220.0030.00316.72
8.0.210.0040.00416.75
8.0.200.0030.00316.86
8.0.190.0000.00816.87
8.0.180.0030.00516.96
8.0.170.0000.00816.89
8.0.160.0040.00416.86
8.0.150.0000.00716.86
8.0.140.0030.00316.77
8.0.130.0040.00313.37
8.0.120.0040.00416.83
8.0.110.0040.00416.89
8.0.100.0030.00516.84
8.0.90.0040.00416.85
8.0.80.0090.00616.79
8.0.70.0040.00417.01
8.0.60.0040.00416.78
8.0.50.0070.00016.71
8.0.30.0070.01217.00
8.0.20.0120.00617.40
8.0.10.0070.00016.94
8.0.00.0130.00616.55
7.4.330.0020.00215.09
7.4.320.0000.00816.52
7.4.300.0060.00016.62
7.4.290.0050.00216.46
7.4.280.0040.00416.45
7.4.270.0030.00316.53
7.4.260.0040.00416.59
7.4.250.0040.00416.62
7.4.240.0050.00216.66
7.4.230.0070.00016.68
7.4.220.0140.00916.54
7.4.210.0110.00516.54
7.4.200.0000.00716.39
7.4.160.0110.01216.42
7.4.150.0040.01417.40
7.4.140.0130.00517.86
7.4.130.0110.00916.47
7.4.120.0080.01116.51
7.4.110.0090.00916.53
7.4.100.0100.00716.54
7.4.90.0150.00916.37
7.4.80.0030.01419.39
7.4.70.0040.01716.38
7.4.60.0070.01016.47
7.4.50.0100.00316.17
7.4.40.0030.01216.45
7.4.30.0060.01916.51
7.4.10.0110.00715.07
7.4.00.0040.01315.08
7.3.330.0050.00013.45
7.3.320.0030.00213.16
7.3.310.0000.00716.40
7.3.300.0000.00616.34
7.3.290.0000.00716.35
7.3.280.0080.01016.35
7.3.270.0150.00617.40
7.3.260.0090.00916.49
7.3.250.0110.00916.50
7.3.240.0120.01116.46
7.3.230.0150.00316.57
7.3.210.0040.01416.52
7.3.200.0070.01016.70
7.3.190.0080.00816.50
7.3.180.0230.00016.70
7.3.170.0100.01316.60
7.3.160.0040.01516.42
7.3.130.0130.00614.76
7.3.120.0120.00614.92
7.3.110.0070.01114.97
7.3.100.0100.00514.60
7.3.90.0060.00614.78
7.3.80.0020.00914.87
7.3.70.0050.01014.81
7.3.60.0020.01114.91
7.3.50.0070.00314.69
7.3.40.0060.00614.76
7.3.30.0080.00714.89
7.3.20.0040.00916.74
7.3.10.0100.00616.45
7.3.00.0100.00416.49
7.2.330.0100.00716.77
7.2.320.0050.01116.78
7.2.310.0030.01916.38
7.2.300.0130.01316.68
7.2.290.0110.00916.56
7.2.260.0070.00715.18
7.2.250.0080.01014.91
7.2.240.0080.01015.24
7.2.230.0060.00815.04
7.2.220.0020.00915.02
7.2.210.0050.00815.08
7.2.200.0080.00514.96
7.2.190.0070.00715.03
7.2.180.0040.01015.00
7.2.170.0010.01014.84
7.2.160.0120.00015.02
7.2.150.0070.00316.71
7.2.140.0030.01016.90
7.2.130.0150.00616.76
7.2.120.0060.00916.69
7.2.110.0020.01116.63
7.2.100.0100.00416.66
7.2.90.0100.00716.68
7.2.80.0080.00516.65
7.2.70.0110.00316.65
7.2.60.0060.00916.73
7.2.50.0080.00816.76
7.2.40.0110.00816.71
7.2.30.0130.00816.79
7.2.20.0100.00816.76
7.2.10.0120.00516.75
7.2.00.0090.00817.49
7.1.330.0080.00515.83
7.1.320.0060.00715.93
7.1.310.0090.00515.84
7.1.300.0000.01315.86
7.1.290.0030.00715.73
7.1.280.0080.00315.69
7.1.270.0070.00515.70
7.1.260.0050.00915.88
7.1.250.0060.00715.67
7.1.240.0060.00315.70
7.1.230.0000.01315.88
7.1.220.0050.00515.79
7.1.210.0000.01415.93
7.1.200.0050.00715.66
7.1.190.0070.00715.96
7.1.180.0060.00915.88
7.1.170.0030.00915.92
7.1.160.0090.00915.83
7.1.150.0000.01215.98
7.1.140.0120.00015.96
7.1.130.0080.00416.00
7.1.120.0000.01015.71
7.1.110.0070.00715.66
7.1.100.0020.00916.96
7.1.90.0060.00915.71
7.1.80.0000.01215.67
7.1.70.0050.00816.54
7.1.60.0010.01316.47
7.1.50.0050.00616.41
7.1.40.0070.00516.21
7.1.30.0090.00716.19
7.1.20.0040.00916.31
7.1.10.0020.01016.15
7.1.00.0030.00816.04
7.0.330.0040.00415.30
7.0.320.0000.01215.04
7.0.310.0030.01015.46
7.0.300.0040.00415.17
7.0.290.0100.00715.35
7.0.280.0040.00415.40
7.0.270.0060.00615.44
7.0.260.0090.00415.24
7.0.250.0100.00315.35
7.0.240.0060.00615.52
7.0.230.0000.01215.31
7.0.220.0070.01015.63
7.0.210.0090.00615.50
7.0.200.0060.00416.06
7.0.190.0050.00616.08
7.0.180.0020.00915.95
7.0.170.0060.00415.81
7.0.160.0040.00615.82
7.0.150.0000.01115.82
7.0.140.0040.00915.84
7.0.130.0080.00716.05
7.0.120.0030.00716.15
7.0.110.0020.01015.86
7.0.100.0020.00815.84
7.0.90.0020.00715.90
7.0.80.0020.00915.83
7.0.70.0060.00515.80
7.0.60.0050.00615.91
7.0.50.0060.00416.01
7.0.40.0040.00614.70
7.0.30.0070.00514.53
7.0.20.0030.00714.63
7.0.10.0060.00314.56
7.0.00.0040.00914.47
5.6.400.0070.00414.14
5.6.390.0070.00314.48
5.6.380.0060.00914.57
5.6.370.0080.00814.41
5.6.360.0040.01214.32
5.6.350.0130.00314.13
5.6.340.0070.00714.49
5.6.330.0060.01214.41
5.6.320.0050.00514.53
5.6.310.0030.01014.65
5.6.300.0050.02117.58
5.6.290.0030.02617.83
5.6.280.0020.02517.68
5.6.270.0070.03017.62
5.6.260.0090.02817.55
5.6.250.0030.02817.83
5.6.240.0050.02917.71
5.6.230.0030.02617.72
5.6.220.0100.02117.50
5.6.210.0100.02117.76
5.6.200.0050.02617.55
5.6.190.0030.02717.71
5.6.180.0030.02717.47
5.6.170.0050.02717.53
5.6.160.0030.02717.64
5.6.150.0060.02617.63
5.6.140.0030.02317.64
5.6.130.0000.02517.52
5.6.120.0090.02417.59
5.6.110.0060.02717.53
5.6.100.0100.04517.60
5.6.90.0050.02917.68
5.6.80.0060.02317.31
5.6.70.0050.02217.35
5.6.60.0050.02917.32
5.6.50.0050.02417.17
5.6.40.0070.03817.34
5.6.30.0040.02417.27
5.6.20.0060.02517.27
5.6.10.0060.02317.39
5.6.00.0050.02417.27

preferences:
31.56 ms | 403 KiB | 5 Q