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 -= strlen($boundaries->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.70.0150.00616.50
8.3.60.0110.00718.29
8.3.50.0040.01118.19
8.3.40.0030.01318.83
8.3.30.0060.00918.86
8.3.20.0090.00019.15
8.3.10.0070.00021.91
8.3.00.0040.00423.70
8.2.190.0150.00616.58
8.2.180.0030.01218.55
8.2.170.0070.00722.96
8.2.160.0040.01119.06
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00018.16
8.2.120.0000.00826.35
8.2.110.0030.00621.18
8.2.100.0080.00417.72
8.2.90.0000.00817.63
8.2.80.0000.00817.97
8.2.70.0080.00017.93
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0000.00719.47
8.2.30.0050.00219.41
8.2.20.0060.00318.14
8.2.10.0040.00419.32
8.2.00.0000.00719.36
8.1.280.0110.01125.92
8.1.270.0040.00422.03
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00622.50
8.1.230.0110.00020.97
8.1.220.0060.00318.77
8.1.210.0070.00319.04
8.1.200.0000.01017.38
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0000.00818.71
8.1.160.0020.00518.89
8.1.150.0040.00418.91
8.1.140.0040.00419.54
8.1.130.0030.00319.01
8.1.120.0000.00817.48
8.1.110.0040.00417.35
8.1.100.0080.00017.48
8.1.90.0040.00417.41
8.1.80.0040.00417.49
8.1.70.0030.00317.41
8.1.60.0000.01017.55
8.1.50.0040.00417.48
8.1.40.0000.00717.57
8.1.30.0030.00517.72
8.1.20.0080.00017.69
8.1.10.0040.00417.61
8.1.00.0040.00417.52
8.0.300.0000.00720.07
8.0.290.0070.00016.63
8.0.280.0040.00418.55
8.0.270.0040.00417.34
8.0.260.0030.00317.17
8.0.250.0000.00716.95
8.0.240.0030.00316.91
8.0.230.0030.00516.86
8.0.220.0030.00316.87
8.0.210.0000.00716.86
8.0.200.0000.00816.98
8.0.190.0070.00016.93
8.0.180.0000.00816.87
8.0.170.0060.00316.89
8.0.160.0000.00716.98
8.0.150.0000.00716.89
8.0.140.0040.00316.85
8.0.130.0060.00013.32
8.0.120.0000.00716.88
8.0.110.0040.00416.89
8.0.100.0000.00716.75
8.0.90.0040.00416.96
8.0.80.0060.01016.84
8.0.70.0080.00016.87
8.0.60.0070.00016.73
8.0.50.0040.00416.85
8.0.30.0130.00617.21
8.0.20.0090.01317.41
8.0.10.0040.00416.99
8.0.00.0100.00716.89
7.4.330.0000.00516.77
7.4.320.0030.00316.65
7.4.300.0000.00716.65
7.4.290.0030.00316.66
7.4.280.0000.00716.50
7.4.270.0090.00316.61
7.4.260.0030.00316.48
7.4.250.0000.00716.57
7.4.240.0030.00316.59
7.4.230.0030.00316.41
7.4.220.0040.00416.61
7.4.210.0100.00716.58
7.4.200.0000.00716.41
7.4.160.0100.00616.61
7.4.140.0130.00517.86
7.4.130.0070.01416.72
7.4.120.0100.00916.46
7.4.110.0100.01316.69
7.4.100.0120.00616.48
7.4.90.0070.01116.47
7.4.80.0090.01219.39
7.4.70.0030.01416.54
7.4.60.0040.01516.59
7.4.50.0080.00616.42
7.4.40.0090.01216.51
7.4.00.0060.00915.03
7.3.330.0050.00013.30
7.3.320.0000.00513.28
7.3.310.0040.00416.28
7.3.300.0070.00016.17
7.3.290.0030.00316.29
7.3.280.0060.00916.32
7.3.260.0130.00716.33
7.3.240.0100.01316.39
7.3.230.0030.01316.55
7.3.210.0130.00516.46
7.3.200.0100.00716.39
7.3.190.0070.01016.18
7.3.180.0000.01616.25
7.3.170.0090.00916.59
7.3.160.0150.00616.38
7.3.120.0060.01014.74
7.3.110.0130.00614.74
7.3.100.0070.00714.65
7.3.90.0100.00014.77
7.3.80.0110.00414.85
7.3.70.0110.00314.70
7.3.60.0030.01014.61
7.3.50.0000.01214.88
7.3.40.0070.00714.49
7.3.30.0040.00414.75
7.3.20.0070.00716.79
7.3.10.0070.00516.65
7.3.00.0030.00816.67
7.2.330.0060.01216.54
7.2.320.0140.00616.63
7.2.310.0100.01216.86
7.2.300.0000.01716.83
7.2.290.0140.00716.70
7.2.250.0040.01414.75
7.2.240.0070.01114.66
7.2.230.0070.00714.74
7.2.220.0040.00714.95
7.2.210.0000.01614.89
7.2.200.0060.00615.14
7.2.190.0070.00714.98
7.2.180.0060.00914.89
7.2.170.0070.00715.08
7.2.130.0040.00716.93
7.2.120.0040.00717.01
7.2.110.0000.01016.97
7.2.100.0060.00616.92
7.2.90.0090.00316.85
7.2.80.0040.00716.79
7.2.70.0160.00815.98
7.2.60.0230.00716.01
7.2.50.0200.00315.97
7.2.40.0180.00415.76
7.2.30.0140.01115.95
7.2.20.0150.00915.73
7.2.10.0140.01015.97
7.2.00.0140.00815.97
7.1.330.0070.00715.39
7.1.320.0080.00415.94
7.1.310.0000.01315.94
7.1.300.0060.00315.82
7.1.290.0060.00315.79
7.1.280.0000.01715.75
7.1.270.0040.00415.82
7.1.260.0080.00615.83
7.1.250.0040.00415.81
7.1.200.0000.01415.78
7.1.170.0280.00613.90
7.1.160.0240.01013.82
7.1.150.0420.00613.83
7.1.140.0340.00014.00
7.1.130.0820.01013.78
7.1.120.0200.01013.85
7.1.110.0260.00613.94
7.1.100.0230.00714.00
7.1.90.0460.00314.07
7.1.80.0410.00614.04
7.1.70.0310.01014.02
7.1.60.0520.01831.94
7.1.50.0540.00631.95
7.1.40.0690.00331.86
7.1.30.0700.00931.89
7.1.20.0690.01431.87
7.1.10.0390.00313.83
7.1.00.0280.01013.71

preferences:
57.82 ms | 401 KiB | 5 Q