## For QGIS versions lower than QGIS 3.20

No, the `$length` function only reports lengths from 2d geometries.