3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); ?> flarg blarg dlarg <!-- BEGIN DYNAMIC BLOCK: guide_greeting --> filler content <!-- END DYNAMIC BLOCK: guide_greeting --> flarg blarg dlarg <?php $content = ob_get_clean(); function getDyanmicBlockContent($content, $tag) { $boundaries = (object) [ 'start' => sprintf('<!-- BEGIN DYNAMIC BLOCK: %s -->', $tag), 'end' => sprintf('<!-- END DYNAMIC BLOCK: %s -->', $tag), ]; $results = (object) [ 'start' => stripos($content, $boundaries->start), 'end' => stripos($content, $boundaries->end), ]; if ($results->start === false || $results->end === false || $results->start > $results->end) { return null; } $results->start += strlen($boundaries->start); $results->end -= $results->start; $substr = substr($content, $results->start, $results->end); return $substr; } var_dump( getDyanmicBlockContent($content, 'guide_greeting') );

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.0120.00618.68
8.3.50.0060.01117.94
8.3.40.0040.01218.84
8.3.30.0120.00318.83
8.3.20.0050.00319.10
8.3.10.0040.00422.02
8.3.00.0070.00023.66
8.2.180.0070.00718.29
8.2.170.0030.01222.96
8.2.160.0120.00319.03
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00418.09
8.2.120.0040.00426.35
8.2.110.0070.00420.75
8.2.100.0040.00717.85
8.2.90.0040.00417.63
8.2.80.0050.00317.97
8.2.70.0000.00817.93
8.2.60.0030.00518.00
8.2.50.0080.00018.10
8.2.40.0000.00719.47
8.2.30.0000.00819.27
8.2.20.0070.00318.01
8.2.10.0000.00819.38
8.2.00.0000.00719.40
8.1.280.0090.00625.92
8.1.270.0000.00822.20
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0060.00322.57
8.1.230.0080.00320.91
8.1.220.0080.00018.77
8.1.210.0040.00818.89
8.1.200.0030.00617.36
8.1.190.0030.00517.35
8.1.180.0000.00818.10
8.1.170.0050.00318.71
8.1.160.0040.00418.80
8.1.150.0000.00718.81
8.1.140.0070.00019.52
8.1.130.0030.00319.01
8.1.120.0000.00717.48
8.1.110.0000.00817.43
8.1.100.0040.00417.45
8.1.90.0000.00717.36
8.1.80.0030.00517.47
8.1.70.0030.00317.49
8.1.60.0090.00317.55
8.1.50.0000.00717.41
8.1.40.0040.00417.55
8.1.30.0030.00617.66
8.1.20.0040.00417.55
8.1.10.0040.00417.59
8.1.00.0040.00417.51
8.0.300.0050.00219.96
8.0.290.0000.00716.75
8.0.280.0000.00718.40
8.0.270.0030.00317.29
8.0.260.0000.00817.26
8.0.250.0030.00316.99
8.0.240.0030.00316.97
8.0.230.0000.00816.93
8.0.220.0020.00516.89
8.0.210.0030.00316.91
8.0.200.0060.00316.84
8.0.190.0000.00716.93
8.0.180.0080.00016.91
8.0.170.0090.00016.80
8.0.160.0080.00016.90
8.0.150.0050.00216.73
8.0.140.0030.00316.89
8.0.130.0000.00613.28
8.0.120.0000.00716.77
8.0.110.0080.00016.83
8.0.100.0070.00016.93
8.0.90.0040.00416.90
8.0.80.0080.00816.88
8.0.70.0070.00016.79
8.0.60.0020.00516.69
8.0.50.0030.00416.88
8.0.30.0090.00817.16
8.0.20.0070.01217.40
8.0.10.0040.00416.84
8.0.00.0110.00716.59
7.4.330.0030.00315.55
7.4.320.0000.00616.36
7.4.300.0070.00016.60
7.4.290.0070.00016.63
7.4.280.0070.00016.50
7.4.270.0050.00516.52
7.4.260.0040.00416.58
7.4.250.0000.00816.51
7.4.240.0060.00316.43
7.4.230.0000.00716.39
7.4.220.0080.00016.58
7.4.210.0110.00616.63
7.4.200.0000.00716.62
7.4.160.0070.00816.51
7.4.140.0090.00917.86
7.4.130.0070.01016.33
7.4.120.0090.01016.56
7.4.110.0060.01216.64
7.4.100.0080.00816.56
7.4.90.0210.00316.65
7.4.80.0100.01319.39
7.4.70.0060.00916.55
7.4.60.0150.00616.63
7.4.50.0000.01516.19
7.4.40.0150.00616.63
7.4.00.0040.01214.84
7.3.330.0000.00513.16
7.3.320.0020.00213.37
7.3.310.0030.00316.28
7.3.300.0070.00016.28
7.3.290.0000.00716.16
7.3.280.0080.00616.30
7.3.260.0100.00716.50
7.3.240.0080.01216.35
7.3.230.0040.01316.32
7.3.210.0090.00916.37
7.3.200.0070.01016.49
7.3.190.0090.00916.37
7.3.180.0060.01016.46
7.3.170.0130.00316.31
7.3.160.0130.00316.54
7.2.330.0100.00716.72
7.2.320.0090.00916.45
7.2.310.0130.01316.43
7.2.300.0000.01716.68
7.2.290.0070.01016.63
7.2.70.0280.01415.07
7.2.60.0220.01214.90
7.2.50.0270.00914.86
7.2.40.0280.00615.11
7.2.30.0400.00615.11
7.2.20.0230.01414.70
7.2.10.0360.00715.23
7.2.00.0670.00616.85
7.1.200.0120.00015.80
7.1.170.0230.01013.97
7.1.160.0360.00513.93
7.1.150.0310.00313.93
7.1.140.0250.00813.99
7.1.130.0280.01413.77
7.1.120.0110.00315.76
7.1.110.0040.00715.85
7.1.100.0080.00415.71
7.1.90.0060.00615.92
7.1.80.0120.00015.71
7.1.70.0030.01015.88
7.1.60.0220.01133.66
7.1.50.0280.00333.79
7.1.40.0150.01833.76
7.1.30.0170.01433.81
7.1.20.0170.01333.45
7.1.10.0040.01115.56
7.1.00.0040.00815.67

preferences:
48.46 ms | 400 KiB | 5 Q