3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "<heading>فهرست اول</heading>hi my name is mahdi whats app <heading>فهرست دوم</heading>how are you<heading>فهرست اول</heading>hi my name is mahdi whats app2 <heading>فهرست دوم</heading>how are you2"; $oldpos =0; $pos =strpos($content, "<heading>",1); While($pos !== false){ $arr[] = Substr($content, $oldpos, $pos-$oldpos); $oldpos = $pos; $pos =strpos($content, "<heading>",$oldpos+1); } $arr[] = Substr($content, $oldpos); Var_dump($arr);

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.0120.00318.20
8.3.60.0160.00616.75
8.3.50.0140.00617.40
8.3.40.0120.00318.75
8.3.30.0080.00818.57
8.3.20.0080.00020.29
8.3.10.0040.00422.14
8.3.00.0040.00423.66
8.2.190.0040.01416.58
8.2.180.0120.00616.63
8.2.170.0110.00418.79
8.2.160.0030.01022.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0160.00320.98
8.2.120.0000.00826.35
8.2.110.0090.00021.10
8.2.100.0040.00717.91
8.2.90.0030.00519.23
8.2.80.0040.00419.46
8.2.70.0060.00317.63
8.2.60.0000.01017.79
8.2.50.0040.00418.22
8.2.40.0030.00620.55
8.2.30.0000.00819.13
8.2.20.0000.00718.00
8.2.10.0000.00718.02
8.2.00.0000.00718.05
8.1.280.0140.00325.92
8.1.270.0040.00420.65
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0060.00621.04
8.1.220.0050.00317.76
8.1.210.0060.00318.77
8.1.200.0060.00317.23
8.1.190.0070.00417.10
8.1.180.0040.00418.10
8.1.170.0050.00318.65
8.1.160.0040.00418.83
8.1.150.0020.00519.98
8.1.140.0080.00019.47
8.1.130.0030.00318.82
8.1.120.0030.00317.41
8.1.110.0040.00417.29
8.1.100.0080.00017.40
8.1.90.0000.00717.42
8.1.80.0050.00217.42
8.1.70.0000.00717.31
8.1.60.0040.00417.54
8.1.50.0000.00917.34
8.1.40.0000.00817.44
8.1.30.0000.00817.61
8.1.20.0040.00417.59
8.1.10.0040.00417.36
8.1.00.0050.00517.30
8.0.300.0060.00318.77
8.0.290.0040.00416.58
8.0.280.0000.00818.39
8.0.270.0040.00417.14
8.0.260.0000.00718.39
8.0.250.0030.00316.83
8.0.240.0030.00616.85
8.0.230.0030.00316.88
8.0.220.0000.00716.79
8.0.210.0020.00516.72
8.0.200.0050.00216.80
8.0.190.0030.00316.92
8.0.180.0000.00816.87
8.0.170.0060.00316.78
8.0.160.0040.00416.73
8.0.150.0070.00016.72
8.0.140.0030.00516.66
8.0.130.0000.00513.15
8.0.120.0000.00716.81
8.0.110.0070.00016.81
8.0.100.0000.00716.66
8.0.90.0020.00516.88
8.0.80.0100.00616.84
8.0.70.0040.00416.78
8.0.60.0000.00816.79
8.0.50.0040.00416.69
8.0.30.0110.00617.20
8.0.20.0090.01217.40
8.0.10.0040.00417.00
8.0.00.0100.00716.58
7.4.330.0000.00415.55
7.4.320.0030.00316.45
7.4.300.0000.00616.56
7.4.290.0040.00416.58
7.4.280.0030.00616.61
7.4.270.0070.00016.50
7.4.260.0030.00316.58
7.4.250.0030.00316.46
7.4.240.0030.00316.61
7.4.230.0070.00016.63
7.4.220.0070.01116.47
7.4.210.0110.00716.62
7.4.200.0000.00716.58
7.4.160.0070.00816.43
7.4.150.0030.01717.40
7.4.140.0130.00917.86
7.4.130.0120.01016.59
7.4.120.0110.00816.44
7.4.110.0080.00816.65
7.4.100.0080.00816.40
7.4.90.0090.00916.48
7.4.80.0130.00619.39
7.4.70.0140.01016.48
7.4.60.0050.01116.51
7.4.50.0070.01016.61
7.4.40.0100.01116.51
7.4.30.0030.01316.56
7.4.00.0020.01314.91
7.3.330.0000.00513.24
7.3.320.0020.00213.17
7.3.310.0000.00716.27
7.3.300.0030.00316.36
7.3.290.0050.00816.29
7.3.280.0080.00716.36
7.3.270.0080.00917.40
7.3.260.0130.00716.37
7.3.250.0100.00716.43
7.3.240.0100.00716.35
7.3.230.0070.01016.61
7.3.210.0080.00816.57
7.3.200.0110.00816.45
7.3.190.0060.01116.39
7.3.180.0120.00916.58
7.3.170.0060.01016.32
7.3.160.0000.01616.38
7.3.120.0070.01014.84
7.3.110.0060.01114.74
7.3.100.0060.00814.97
7.3.90.0050.00815.06
7.3.80.0070.00714.85
7.3.70.0010.01114.70
7.3.60.0020.01314.88
7.3.50.0030.00814.76
7.3.40.0080.00614.77
7.3.30.0070.00714.79
7.3.20.0080.00816.63
7.3.10.0050.00716.83
7.3.00.0070.01016.68
7.2.330.0050.01116.54
7.2.320.0120.01216.59
7.2.310.0170.01816.68
7.2.300.0100.01016.60
7.2.290.0090.00916.62
7.2.250.0030.01215.12
7.2.240.0080.01114.94
7.2.230.0100.00514.94
7.2.220.0130.00515.18
7.2.210.0040.01115.06
7.2.200.0040.00815.00
7.2.190.0070.00815.03
7.2.180.0030.00814.96
7.2.170.0030.00815.00
7.2.60.0070.00716.88
7.1.330.0020.01215.82
7.1.320.0040.01015.75
7.1.310.0080.00815.83
7.1.300.0060.00615.82
7.1.290.0100.00515.87
7.1.280.0030.01115.71
7.1.270.0020.00815.58
7.1.260.0020.01115.72
7.1.200.0080.00815.81
7.1.90.0060.00918.16
7.1.80.0090.00518.30
7.1.70.0230.00816.24
7.1.60.0380.00934.10
7.1.50.0180.01434.88
7.1.40.0200.01134.63
7.1.30.0170.01433.56
7.1.20.0470.01533.60
7.1.10.0120.00916.64
7.1.00.0080.00516.73
7.0.230.0070.00916.64
7.0.220.0250.00817.01
7.0.210.0410.00915.63
7.0.200.0060.00916.71
7.0.190.0410.00915.88
7.0.180.0350.00915.36
7.0.170.0360.01116.29
7.0.160.0240.00816.31
7.0.150.0020.01316.30
7.0.140.0050.01016.19
7.0.130.0280.00615.61
7.0.120.0340.01116.54
7.0.110.0250.01115.31
7.0.100.0030.01315.44
7.0.90.0050.00815.50
7.0.80.0200.00515.47
7.0.70.0240.00715.39
7.0.60.0070.00816.20
7.0.50.0150.01016.33
7.0.40.0210.00615.57
7.0.30.0080.00515.54
7.0.20.0200.00615.38
7.0.10.0190.01015.53
7.0.00.0340.01115.40

preferences:
46.06 ms | 401 KiB | 5 Q