We all know that zooming with your lens and zooming with your feet do not produce the same results in general. However, there are important exceptions.
Consider the two photos below. The first was taken by zooming with the lens and the second by zooming with my feet. It is obvious that the two images are more or less identical after allowing for (i) small errors in alignment (both shots were handheld), and (ii) slight barrel distortion in the second image, caused by the lens. Both are the full size, uncropped images. The only processing was for brightness and colour balance.
The subject is an information poster attached to a fence around the restoration work on the lock. The first image was taken with a 100mm lens at some distance from the poster. The second image was taken with a 12mm lens at a distance that was approximately 0.12 times the subject distance for the first image.
This is quite a good illustration of the basic principles of perspective. Going closer to your subject increases the image size (which is inversely proportional to the distance). But the image size is also proportional to the focal length of the lens. So, the image size may be kept constant if the subject distance and focal length are changed simultaneously by the same factor.
This works if the subject is 2-D and in a plane parallel to the sensor in the camera. For a 3-D scene where different parts of the scene are at different distances from the camera, the second image will look the same as the first only if everything in the scene can be moved to 0.12 times its original distance from the camera. In other words, the whole scene would have to be compressed by the factor 0.12.