3v4l.org

run code in 300+ PHP versions simultaneously
<?php function serialize_block( $block ) { // Non-block content has no block name. if ( null === $block['blockName'] ) { return $block['innerHTML']; } $output = ''; // ... return $output; } $block = array( //'blockName' => 'test/void', 'attrs' => array(), 'innerBlocks' => array(), 'innerHTML' => '', 'innerContent' => array(), ); echo serialize_block( $block );

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.0070.01118.56
8.3.50.0120.01017.36
8.3.40.0070.00718.97
8.3.30.0110.00418.71
8.3.20.0040.00421.76
8.3.10.0080.00021.89
8.3.00.0040.00423.67
8.2.180.0090.01216.75
8.2.170.0040.01122.96
8.2.160.0030.01020.38
8.2.150.0070.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0070.00320.94
8.2.100.0080.00417.84
8.2.90.0030.00618.16
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0000.00818.16
8.2.50.0000.00818.10
8.2.40.0080.00019.34
8.2.30.0040.00419.21
8.2.20.0040.00418.01
8.2.10.0050.00318.80
8.2.00.0000.00719.06
8.1.280.0130.00325.92
8.1.270.0080.00022.45
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.27
8.1.230.0070.00320.97
8.1.220.0040.00417.76
8.1.210.0060.00618.77
8.1.200.0090.00017.23
8.1.190.0040.00417.13
8.1.180.0050.00318.10
8.1.170.0040.00418.64
8.1.160.0000.00718.82
8.1.150.0030.00318.68
8.1.140.0040.00418.82
8.1.130.0070.00020.02
8.1.120.0030.00617.46
8.1.110.0070.00017.41
8.1.100.0040.00317.29
8.1.90.0040.00417.41
8.1.80.0070.00017.44
8.1.70.0030.00317.38
8.1.60.0000.00717.46
8.1.50.0050.00317.49
8.1.40.0040.00417.54
8.1.30.0040.00417.72
8.1.20.0000.00817.63
8.1.10.0040.00417.52
8.1.00.0000.00717.38
8.0.300.0060.00319.60
8.0.290.0000.00816.75
8.0.280.0030.00318.45
8.0.270.0030.00617.20
8.0.260.0000.00618.45
8.0.250.0000.00716.93
8.0.240.0030.00316.88
8.0.230.0040.00316.98
8.0.220.0030.00316.81
8.0.210.0040.00316.92
8.0.200.0030.00317.04
8.0.190.0040.00416.85
8.0.180.0040.00416.77
8.0.170.0000.00816.93
8.0.160.0040.00416.92
8.0.150.0070.00016.77
8.0.140.0040.00316.87
8.0.130.0030.00613.38
8.0.120.0040.00416.77
8.0.110.0040.00416.92
8.0.100.0000.00816.87
8.0.90.0050.00316.87
8.0.80.0090.00916.88
8.0.70.0070.00016.79
8.0.60.0000.00716.69
8.0.50.0000.00716.95
8.0.30.0120.00817.33
8.0.20.0070.01416.88
8.0.10.0000.00717.02
8.0.00.0100.00916.84
7.4.330.0030.00315.55
7.4.320.0000.00816.65
7.4.300.0060.00016.36
7.4.290.0040.00416.43
7.4.280.0030.00616.64
7.4.270.0000.00716.53
7.4.260.0000.00716.49
7.4.250.0000.00716.37
7.4.240.0020.00516.46
7.4.230.0030.00316.44
7.4.220.0080.00016.34
7.4.210.0110.00516.54
7.4.200.0070.00016.47
7.4.160.0080.00816.61
7.4.130.0100.00716.57
7.4.120.0090.00916.62
7.4.110.0090.01216.38
7.4.100.0100.01616.47
7.4.90.0030.01916.62
7.4.80.0070.01619.39
7.4.70.0110.00616.62
7.4.60.0030.01316.52
7.4.50.0030.01316.21
7.4.40.0170.00316.37
7.4.00.0040.01114.68
7.3.330.0000.00513.33
7.3.320.0000.00613.23
7.3.310.0030.00316.42
7.3.300.0070.00016.23
7.3.290.0070.00716.32
7.3.280.0070.00816.28
7.3.260.0120.00616.43
7.3.240.0100.00816.41
7.3.230.0070.01016.52
7.3.210.0110.00716.28
7.3.200.0100.00616.39
7.3.190.0120.00316.37
7.3.180.0040.01116.32
7.3.170.0130.00616.28
7.3.160.0090.00616.44
7.3.60.0070.01114.69
7.3.50.0060.00614.60
7.3.40.0070.00514.69
7.3.30.0070.00714.79
7.3.20.0070.01016.66
7.3.10.0130.01016.53
7.3.00.0030.00816.39
7.2.330.0130.00616.34
7.2.320.0000.01716.75
7.2.310.0160.00016.85
7.2.300.0130.00316.79
7.2.290.0080.00816.74
7.2.190.0110.00814.95
7.2.180.0130.00514.76
7.2.170.0070.00514.99
7.2.160.0050.00515.05
7.2.150.0120.00516.68
7.2.140.0080.00316.87
7.2.130.0110.00516.93
7.2.120.0130.00516.78
7.2.110.0100.00616.77
7.2.100.0070.00716.82
7.2.90.0060.00616.95
7.2.80.0110.01216.86
7.2.70.0110.00716.90
7.2.60.0150.00716.75
7.2.50.0110.00716.86
7.2.40.0100.00616.71
7.2.30.0070.00516.67
7.2.20.0090.00916.77
7.2.10.0110.01116.69
7.2.00.0050.00916.96
7.1.300.0090.00915.45
7.1.290.0100.00615.55
7.1.280.0060.01115.62
7.1.270.0050.00515.69
7.1.260.0080.00315.72
7.1.250.0130.00415.69

preferences:
60.23 ms | 401 KiB | 5 Q